@iai-skunks/ml-registry-solana
Advanced tools
Comparing version 0.6.2 to 0.6.3
@@ -19,3 +19,3 @@ /// <reference types="node" /> | ||
constructor(vs: number[][]); | ||
static bufferedDimensions(var_len: number): Buffer; | ||
static bufferedDimensions(outerArrayLength: number): Buffer; | ||
toBuffer(): Buffer; | ||
@@ -22,0 +22,0 @@ } |
@@ -42,10 +42,7 @@ "use strict"; | ||
} | ||
static bufferedDimensions(var_len) { | ||
static bufferedDimensions(outerArrayLength) { | ||
const buffers = []; | ||
buffers.push(new Numberu32(1).toBuffer()); | ||
// Set the total length of the buffer to 5 | ||
const buffer = Buffer.concat(buffers, 5); | ||
buffer[1] = var_len; | ||
// the total length of the buffer that the program is looking for | ||
(0, assert_1.default)(buffer.length === 5); | ||
buffers.push(new Numberu32(outerArrayLength).toBuffer()); | ||
const buffer = Buffer.concat(buffers); | ||
(0, assert_1.default)(buffer.length === 4); | ||
return buffer; | ||
@@ -64,3 +61,3 @@ } | ||
const buffer = Buffer.concat(row_buffers); | ||
(0, assert_1.default)(buffer.length === 5 * this.vals.length * this.vals[0].length); | ||
(0, assert_1.default)(buffer.length === 4 * this.vals.length * (1 + this.vals[0].length)); | ||
return buffer; | ||
@@ -67,0 +64,0 @@ } |
@@ -64,2 +64,3 @@ "use strict"; | ||
const buffers = [ | ||
Buffer.from(Int8Array.from([1])), | ||
// Buffer for the length of outer and inner array / vector. | ||
@@ -66,0 +67,0 @@ custom_types_1.Float32Array2D.bufferedDimensions(indVars.length), |
{ | ||
"name": "@iai-skunks/ml-registry-solana", | ||
"version": "0.6.2", | ||
"version": "0.6.3", | ||
"description": "SPL ML Model Registry/Inference JavaScript API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -0,1 +1,5 @@ | ||
## v0.6.02 | ||
- modifying customer_type.ts to aviod calling flat function | ||
## v0.6.01 | ||
@@ -2,0 +6,0 @@ |
@@ -46,10 +46,7 @@ import assert from "assert"; | ||
static bufferedDimensions(var_len: number): Buffer { | ||
static bufferedDimensions(outerArrayLength: number): Buffer { | ||
const buffers: Buffer[] = []; | ||
buffers.push(new Numberu32(1).toBuffer()); | ||
// Set the total length of the buffer to 5 | ||
const buffer = Buffer.concat(buffers, 5); | ||
buffer[1] = var_len; | ||
// the total length of the buffer that the program is looking for | ||
assert(buffer.length === 5); | ||
buffers.push(new Numberu32(outerArrayLength).toBuffer()); | ||
const buffer = Buffer.concat(buffers); | ||
assert(buffer.length === 4); | ||
return buffer; | ||
@@ -69,3 +66,3 @@ } | ||
const buffer = Buffer.concat(row_buffers); | ||
assert(buffer.length === 5 * this.vals.length * this.vals[0].length); | ||
assert(buffer.length === 4 * this.vals.length * (1 + this.vals[0].length)); | ||
return buffer; | ||
@@ -72,0 +69,0 @@ } |
@@ -107,2 +107,3 @@ import { PublicKey, TransactionInstruction } from "@solana/web3.js"; | ||
const buffers = [ | ||
Buffer.from(Int8Array.from([1])), | ||
// Buffer for the length of outer and inner array / vector. | ||
@@ -109,0 +110,0 @@ Float32Array2D.bufferedDimensions(indVars.length), |
65682
1569