@gmsol-labs/gmsol-sdk 0.7.1 → 0.7.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +12 -0
- package/index_bg.js +44 -0
- package/index_bg.wasm +0 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -803,6 +803,10 @@ export class Keypair {
|
|
|
803
803
|
export class Market {
|
|
804
804
|
private constructor();
|
|
805
805
|
free(): void;
|
|
806
|
+
/**
|
|
807
|
+
* Create from base64 encoded account data with options.
|
|
808
|
+
*/
|
|
809
|
+
static decode_from_base64_with_options(data: string, no_discriminator?: boolean | null): Market;
|
|
806
810
|
/**
|
|
807
811
|
* Create from base64 encoded account data.
|
|
808
812
|
*/
|
|
@@ -961,10 +965,18 @@ export class PodElGamalPubkey {
|
|
|
961
965
|
export class Position {
|
|
962
966
|
private constructor();
|
|
963
967
|
free(): void;
|
|
968
|
+
/**
|
|
969
|
+
* Create from base64 encoded account data with options.
|
|
970
|
+
*/
|
|
971
|
+
static decode_from_base64_with_options(data: string, no_discriminator?: boolean | null): Position;
|
|
964
972
|
/**
|
|
965
973
|
* Create from base64 encoded account data.
|
|
966
974
|
*/
|
|
967
975
|
static decode_from_base64(data: string): Position;
|
|
976
|
+
/**
|
|
977
|
+
* Create from account data.
|
|
978
|
+
*/
|
|
979
|
+
static decode(data: Uint8Array): Position;
|
|
968
980
|
/**
|
|
969
981
|
* Convert to a [`JsPositionModel`].
|
|
970
982
|
*/
|
package/index_bg.js
CHANGED
|
@@ -612,6 +612,21 @@ export class Market {
|
|
|
612
612
|
const ptr = this.__destroy_into_raw();
|
|
613
613
|
wasm.__wbg_market_free(ptr, 0);
|
|
614
614
|
}
|
|
615
|
+
/**
|
|
616
|
+
* Create from base64 encoded account data with options.
|
|
617
|
+
* @param {string} data
|
|
618
|
+
* @param {boolean | null} [no_discriminator]
|
|
619
|
+
* @returns {Market}
|
|
620
|
+
*/
|
|
621
|
+
static decode_from_base64_with_options(data, no_discriminator) {
|
|
622
|
+
const ptr0 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
623
|
+
const len0 = WASM_VECTOR_LEN;
|
|
624
|
+
const ret = wasm.market_decode_from_base64_with_options(ptr0, len0, isLikeNone(no_discriminator) ? 0xFFFFFF : no_discriminator ? 1 : 0);
|
|
625
|
+
if (ret[2]) {
|
|
626
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
627
|
+
}
|
|
628
|
+
return Market.__wrap(ret[0]);
|
|
629
|
+
}
|
|
615
630
|
/**
|
|
616
631
|
* Create from base64 encoded account data.
|
|
617
632
|
* @param {string} data
|
|
@@ -1154,6 +1169,21 @@ export class Position {
|
|
|
1154
1169
|
const ptr = this.__destroy_into_raw();
|
|
1155
1170
|
wasm.__wbg_position_free(ptr, 0);
|
|
1156
1171
|
}
|
|
1172
|
+
/**
|
|
1173
|
+
* Create from base64 encoded account data with options.
|
|
1174
|
+
* @param {string} data
|
|
1175
|
+
* @param {boolean | null} [no_discriminator]
|
|
1176
|
+
* @returns {Position}
|
|
1177
|
+
*/
|
|
1178
|
+
static decode_from_base64_with_options(data, no_discriminator) {
|
|
1179
|
+
const ptr0 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1180
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1181
|
+
const ret = wasm.position_decode_from_base64_with_options(ptr0, len0, isLikeNone(no_discriminator) ? 0xFFFFFF : no_discriminator ? 1 : 0);
|
|
1182
|
+
if (ret[2]) {
|
|
1183
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1184
|
+
}
|
|
1185
|
+
return Position.__wrap(ret[0]);
|
|
1186
|
+
}
|
|
1157
1187
|
/**
|
|
1158
1188
|
* Create from base64 encoded account data.
|
|
1159
1189
|
* @param {string} data
|
|
@@ -1168,6 +1198,20 @@ export class Position {
|
|
|
1168
1198
|
}
|
|
1169
1199
|
return Position.__wrap(ret[0]);
|
|
1170
1200
|
}
|
|
1201
|
+
/**
|
|
1202
|
+
* Create from account data.
|
|
1203
|
+
* @param {Uint8Array} data
|
|
1204
|
+
* @returns {Position}
|
|
1205
|
+
*/
|
|
1206
|
+
static decode(data) {
|
|
1207
|
+
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
1208
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1209
|
+
const ret = wasm.position_decode(ptr0, len0);
|
|
1210
|
+
if (ret[2]) {
|
|
1211
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1212
|
+
}
|
|
1213
|
+
return Position.__wrap(ret[0]);
|
|
1214
|
+
}
|
|
1171
1215
|
/**
|
|
1172
1216
|
* Convert to a [`JsPositionModel`].
|
|
1173
1217
|
* @param {MarketModel} market
|
package/index_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED