@layerzerolabs/onesig-stellar-sdk 0.2.60 → 0.2.61

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.
@@ -1,73 +1,73 @@
1
1
  'use strict';
2
2
 
3
- var _5T7UM34D_js = require('../5T7UM34D.js');
3
+ var YMEC3WUG_js = require('../YMEC3WUG.js');
4
4
  require('../VUOMXK5T.js');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "AuthError", {
9
9
  enumerable: true,
10
- get: function () { return _5T7UM34D_js.AuthError; }
10
+ get: function () { return YMEC3WUG_js.AuthError; }
11
11
  });
12
12
  Object.defineProperty(exports, "BufferReaderError", {
13
13
  enumerable: true,
14
- get: function () { return _5T7UM34D_js.BufferReaderError; }
14
+ get: function () { return YMEC3WUG_js.BufferReaderError; }
15
15
  });
16
16
  Object.defineProperty(exports, "BufferWriterError", {
17
17
  enumerable: true,
18
- get: function () { return _5T7UM34D_js.BufferWriterError; }
18
+ get: function () { return YMEC3WUG_js.BufferWriterError; }
19
19
  });
20
20
  Object.defineProperty(exports, "BytesExtError", {
21
21
  enumerable: true,
22
- get: function () { return _5T7UM34D_js.BytesExtError; }
22
+ get: function () { return YMEC3WUG_js.BytesExtError; }
23
23
  });
24
24
  Object.defineProperty(exports, "Client", {
25
25
  enumerable: true,
26
- get: function () { return _5T7UM34D_js.Client; }
26
+ get: function () { return YMEC3WUG_js.Client; }
27
27
  });
28
28
  Object.defineProperty(exports, "MultiSigError", {
29
29
  enumerable: true,
30
- get: function () { return _5T7UM34D_js.MultiSigError; }
30
+ get: function () { return YMEC3WUG_js.MultiSigError; }
31
31
  });
32
32
  Object.defineProperty(exports, "OneSigError", {
33
33
  enumerable: true,
34
- get: function () { return _5T7UM34D_js.OneSigError; }
34
+ get: function () { return YMEC3WUG_js.OneSigError; }
35
35
  });
36
36
  Object.defineProperty(exports, "OwnableError", {
37
37
  enumerable: true,
38
- get: function () { return _5T7UM34D_js.OwnableError; }
38
+ get: function () { return YMEC3WUG_js.OwnableError; }
39
39
  });
40
40
  Object.defineProperty(exports, "RbacError", {
41
41
  enumerable: true,
42
- get: function () { return _5T7UM34D_js.RbacError; }
42
+ get: function () { return YMEC3WUG_js.RbacError; }
43
43
  });
44
44
  Object.defineProperty(exports, "TtlConfigurableError", {
45
45
  enumerable: true,
46
- get: function () { return _5T7UM34D_js.TtlConfigurableError; }
46
+ get: function () { return YMEC3WUG_js.TtlConfigurableError; }
47
47
  });
48
48
  Object.defineProperty(exports, "UpgradeableError", {
49
49
  enumerable: true,
50
- get: function () { return _5T7UM34D_js.UpgradeableError; }
50
+ get: function () { return YMEC3WUG_js.UpgradeableError; }
51
51
  });
52
52
  Object.defineProperty(exports, "WASM_BASE64", {
53
53
  enumerable: true,
54
- get: function () { return _5T7UM34D_js.WASM_BASE64; }
54
+ get: function () { return YMEC3WUG_js.WASM_BASE64; }
55
55
  });
56
56
  Object.defineProperty(exports, "WASM_HASH", {
57
57
  enumerable: true,
58
- get: function () { return _5T7UM34D_js.WASM_HASH; }
58
+ get: function () { return YMEC3WUG_js.WASM_HASH; }
59
59
  });
60
60
  Object.defineProperty(exports, "contract", {
61
61
  enumerable: true,
62
- get: function () { return _5T7UM34D_js.contract; }
62
+ get: function () { return YMEC3WUG_js.contract; }
63
63
  });
64
64
  Object.defineProperty(exports, "getWasmBuffer", {
65
65
  enumerable: true,
66
- get: function () { return _5T7UM34D_js.getWasmBuffer; }
66
+ get: function () { return YMEC3WUG_js.getWasmBuffer; }
67
67
  });
68
68
  Object.defineProperty(exports, "rpc", {
69
69
  enumerable: true,
70
- get: function () { return _5T7UM34D_js.rpc; }
70
+ get: function () { return YMEC3WUG_js.rpc; }
71
71
  });
72
72
  //# sourceMappingURL=index.js.map
73
73
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- export { AuthError, BufferReaderError, BufferWriterError, BytesExtError, Client, MultiSigError, OneSigError, OwnableError, RbacError, TtlConfigurableError, UpgradeableError, WASM_BASE64, WASM_HASH, contract, getWasmBuffer, rpc } from '../LLFTVQ4V.mjs';
1
+ export { AuthError, BufferReaderError, BufferWriterError, BytesExtError, Client, MultiSigError, OneSigError, OwnableError, RbacError, TtlConfigurableError, UpgradeableError, WASM_BASE64, WASM_HASH, contract, getWasmBuffer, rpc } from '../TMJBDWPO.mjs';
2
2
  import '../YYM473VY.mjs';
3
3
  //# sourceMappingURL=index.mjs.map
4
4
  //# sourceMappingURL=index.mjs.map
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './generated/index';
2
2
  export * from './leafGenerator';
3
+ export * from './calls';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -1,78 +1,99 @@
1
1
  'use strict';
2
2
 
3
- var ZJZTH3QQ_js = require('./ZJZTH3QQ.js');
4
- var _5T7UM34D_js = require('./5T7UM34D.js');
3
+ var WX2KPL4Q_js = require('./WX2KPL4Q.js');
4
+ var M6XHZL6A_js = require('./M6XHZL6A.js');
5
+ var YMEC3WUG_js = require('./YMEC3WUG.js');
5
6
  require('./VUOMXK5T.js');
6
7
 
7
8
 
8
9
 
10
+ Object.defineProperty(exports, "createSetExecutorCall", {
11
+ enumerable: true,
12
+ get: function () { return WX2KPL4Q_js.createSetExecutorCall; }
13
+ });
14
+ Object.defineProperty(exports, "createSetExecutorRequiredCall", {
15
+ enumerable: true,
16
+ get: function () { return WX2KPL4Q_js.createSetExecutorRequiredCall; }
17
+ });
18
+ Object.defineProperty(exports, "createSetSeedCall", {
19
+ enumerable: true,
20
+ get: function () { return WX2KPL4Q_js.createSetSeedCall; }
21
+ });
22
+ Object.defineProperty(exports, "createSetSignerCall", {
23
+ enumerable: true,
24
+ get: function () { return WX2KPL4Q_js.createSetSignerCall; }
25
+ });
26
+ Object.defineProperty(exports, "createSetThresholdCall", {
27
+ enumerable: true,
28
+ get: function () { return WX2KPL4Q_js.createSetThresholdCall; }
29
+ });
9
30
  Object.defineProperty(exports, "stellarLeafGenerator", {
10
31
  enumerable: true,
11
- get: function () { return ZJZTH3QQ_js.stellarLeafGenerator; }
32
+ get: function () { return M6XHZL6A_js.stellarLeafGenerator; }
12
33
  });
13
34
  Object.defineProperty(exports, "AuthError", {
14
35
  enumerable: true,
15
- get: function () { return _5T7UM34D_js.AuthError; }
36
+ get: function () { return YMEC3WUG_js.AuthError; }
16
37
  });
17
38
  Object.defineProperty(exports, "BufferReaderError", {
18
39
  enumerable: true,
19
- get: function () { return _5T7UM34D_js.BufferReaderError; }
40
+ get: function () { return YMEC3WUG_js.BufferReaderError; }
20
41
  });
21
42
  Object.defineProperty(exports, "BufferWriterError", {
22
43
  enumerable: true,
23
- get: function () { return _5T7UM34D_js.BufferWriterError; }
44
+ get: function () { return YMEC3WUG_js.BufferWriterError; }
24
45
  });
25
46
  Object.defineProperty(exports, "BytesExtError", {
26
47
  enumerable: true,
27
- get: function () { return _5T7UM34D_js.BytesExtError; }
48
+ get: function () { return YMEC3WUG_js.BytesExtError; }
28
49
  });
29
50
  Object.defineProperty(exports, "Client", {
30
51
  enumerable: true,
31
- get: function () { return _5T7UM34D_js.Client; }
52
+ get: function () { return YMEC3WUG_js.Client; }
32
53
  });
33
54
  Object.defineProperty(exports, "MultiSigError", {
34
55
  enumerable: true,
35
- get: function () { return _5T7UM34D_js.MultiSigError; }
56
+ get: function () { return YMEC3WUG_js.MultiSigError; }
36
57
  });
37
58
  Object.defineProperty(exports, "OneSigError", {
38
59
  enumerable: true,
39
- get: function () { return _5T7UM34D_js.OneSigError; }
60
+ get: function () { return YMEC3WUG_js.OneSigError; }
40
61
  });
41
62
  Object.defineProperty(exports, "OwnableError", {
42
63
  enumerable: true,
43
- get: function () { return _5T7UM34D_js.OwnableError; }
64
+ get: function () { return YMEC3WUG_js.OwnableError; }
44
65
  });
45
66
  Object.defineProperty(exports, "RbacError", {
46
67
  enumerable: true,
47
- get: function () { return _5T7UM34D_js.RbacError; }
68
+ get: function () { return YMEC3WUG_js.RbacError; }
48
69
  });
49
70
  Object.defineProperty(exports, "TtlConfigurableError", {
50
71
  enumerable: true,
51
- get: function () { return _5T7UM34D_js.TtlConfigurableError; }
72
+ get: function () { return YMEC3WUG_js.TtlConfigurableError; }
52
73
  });
53
74
  Object.defineProperty(exports, "UpgradeableError", {
54
75
  enumerable: true,
55
- get: function () { return _5T7UM34D_js.UpgradeableError; }
76
+ get: function () { return YMEC3WUG_js.UpgradeableError; }
56
77
  });
57
78
  Object.defineProperty(exports, "WASM_BASE64", {
58
79
  enumerable: true,
59
- get: function () { return _5T7UM34D_js.WASM_BASE64; }
80
+ get: function () { return YMEC3WUG_js.WASM_BASE64; }
60
81
  });
61
82
  Object.defineProperty(exports, "WASM_HASH", {
62
83
  enumerable: true,
63
- get: function () { return _5T7UM34D_js.WASM_HASH; }
84
+ get: function () { return YMEC3WUG_js.WASM_HASH; }
64
85
  });
65
86
  Object.defineProperty(exports, "contract", {
66
87
  enumerable: true,
67
- get: function () { return _5T7UM34D_js.contract; }
88
+ get: function () { return YMEC3WUG_js.contract; }
68
89
  });
69
90
  Object.defineProperty(exports, "getWasmBuffer", {
70
91
  enumerable: true,
71
- get: function () { return _5T7UM34D_js.getWasmBuffer; }
92
+ get: function () { return YMEC3WUG_js.getWasmBuffer; }
72
93
  });
73
94
  Object.defineProperty(exports, "rpc", {
74
95
  enumerable: true,
75
- get: function () { return _5T7UM34D_js.rpc; }
96
+ get: function () { return YMEC3WUG_js.rpc; }
76
97
  });
77
98
  //# sourceMappingURL=index.js.map
78
99
  //# sourceMappingURL=index.js.map
package/dist/index.mjs CHANGED
@@ -1,5 +1,6 @@
1
- export { stellarLeafGenerator } from './2LBFEV2A.mjs';
2
- export { AuthError, BufferReaderError, BufferWriterError, BytesExtError, Client, MultiSigError, OneSigError, OwnableError, RbacError, TtlConfigurableError, UpgradeableError, WASM_BASE64, WASM_HASH, contract, getWasmBuffer, rpc } from './LLFTVQ4V.mjs';
1
+ export { createSetExecutorCall, createSetExecutorRequiredCall, createSetSeedCall, createSetSignerCall, createSetThresholdCall } from './F6ZSIYGU.mjs';
2
+ export { stellarLeafGenerator } from './PWNPMHDJ.mjs';
3
+ export { AuthError, BufferReaderError, BufferWriterError, BytesExtError, Client, MultiSigError, OneSigError, OwnableError, RbacError, TtlConfigurableError, UpgradeableError, WASM_BASE64, WASM_HASH, contract, getWasmBuffer, rpc } from './TMJBDWPO.mjs';
3
4
  import './YYM473VY.mjs';
4
5
  //# sourceMappingURL=index.mjs.map
5
6
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,10 @@
1
+ import type { xdr } from '@stellar/stellar-sdk';
1
2
  import { type BaseLeafData, type GenerateLeafsResult } from '@layerzerolabs/onesig-core';
2
- export interface StellarCallData {
3
- invocation: Buffer;
3
+ export interface StellarCall {
4
+ contractAddress: string;
5
+ functionName: string;
6
+ args: xdr.ScVal[];
4
7
  }
5
- export type StellarLeafData = BaseLeafData<string, StellarCallData>;
8
+ export type StellarLeafData = BaseLeafData<string, StellarCall>;
6
9
  export declare function stellarLeafGenerator(leafs: StellarLeafData[]): GenerateLeafsResult<StellarLeafData>;
7
10
  //# sourceMappingURL=leafGenerator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"leafGenerator.d.ts","sourceRoot":"","sources":["../src/leafGenerator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGzF,MAAM,WAAW,eAAe;IAE5B,UAAU,EAAE,MAAM,CAAC;CACtB;AAOD,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;AAGpE,wBAAgB,oBAAoB,CAChC,KAAK,EAAE,eAAe,EAAE,GACzB,mBAAmB,CAAC,eAAe,CAAC,CAuBtC"}
1
+ {"version":3,"file":"leafGenerator.d.ts","sourceRoot":"","sources":["../src/leafGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAGhD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAuBzF,MAAM,WAAW,WAAW;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC;CACrB;AAED,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AAGhE,wBAAgB,oBAAoB,CAChC,KAAK,EAAE,eAAe,EAAE,GACzB,mBAAmB,CAAC,eAAe,CAAC,CAsCtC"}
@@ -1,13 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var ZJZTH3QQ_js = require('./ZJZTH3QQ.js');
3
+ var M6XHZL6A_js = require('./M6XHZL6A.js');
4
+ require('./YMEC3WUG.js');
4
5
  require('./VUOMXK5T.js');
5
6
 
6
7
 
7
8
 
8
9
  Object.defineProperty(exports, "stellarLeafGenerator", {
9
10
  enumerable: true,
10
- get: function () { return ZJZTH3QQ_js.stellarLeafGenerator; }
11
+ get: function () { return M6XHZL6A_js.stellarLeafGenerator; }
11
12
  });
12
13
  //# sourceMappingURL=leafGenerator.js.map
13
14
  //# sourceMappingURL=leafGenerator.js.map
@@ -1,4 +1,5 @@
1
- export { stellarLeafGenerator } from './2LBFEV2A.mjs';
1
+ export { stellarLeafGenerator } from './PWNPMHDJ.mjs';
2
+ import './TMJBDWPO.mjs';
2
3
  import './YYM473VY.mjs';
3
4
  //# sourceMappingURL=leafGenerator.mjs.map
4
5
  //# sourceMappingURL=leafGenerator.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layerzerolabs/onesig-stellar-sdk",
3
- "version": "0.2.60",
3
+ "version": "0.2.61",
4
4
  "private": false,
5
5
  "description": "TypeScript SDK for OneSig Stellar contract",
6
6
  "license": "MIT",
@@ -18,7 +18,7 @@
18
18
  ],
19
19
  "dependencies": {
20
20
  "@stellar/stellar-sdk": "^14.1.1",
21
- "@layerzerolabs/onesig-core": "0.2.60"
21
+ "@layerzerolabs/onesig-core": "0.2.61"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/node": "^22.18.6",
@@ -26,10 +26,10 @@
26
26
  "tsup": "^8.4.0",
27
27
  "typescript": "^5.8.2",
28
28
  "vitest": "^3.2.3",
29
- "@layerzerolabs/onesig-stellar": "0.2.60",
30
- "@layerzerolabs/tsup-configuration": "0.2.60",
31
- "@layerzerolabs/typescript-configuration": "0.2.60",
32
- "@layerzerolabs/vm-tooling-stellar": "0.2.60"
29
+ "@layerzerolabs/onesig-stellar": "0.2.61",
30
+ "@layerzerolabs/tsup-configuration": "0.2.61",
31
+ "@layerzerolabs/typescript-configuration": "0.2.61",
32
+ "@layerzerolabs/vm-tooling-stellar": "0.2.61"
33
33
  },
34
34
  "publishConfig": {
35
35
  "access": "public",
package/dist/2LBFEV2A.mjs DELETED
@@ -1,28 +0,0 @@
1
- import { __name } from './YYM473VY.mjs';
2
- import { StrKey } from '@stellar/stellar-sdk';
3
-
4
- function stellarLeafGenerator(leafs) {
5
- return {
6
- leafs,
7
- /** Encode OneSig contract address (C...) to 32-byte buffer */
8
- encodeAddress(address) {
9
- try {
10
- return StrKey.decodeContract(address);
11
- } catch {
12
- throw new Error(`Invalid OneSig contract address: ${address}. Expected: C...`);
13
- }
14
- },
15
- /** Encode invocation XDR for leaf hashing. Expects exactly one call. */
16
- encodeCalls(calls) {
17
- if (calls.length !== 1) {
18
- throw new Error(`Stellar leaf must have exactly one invocation, got ${calls.length}`);
19
- }
20
- return calls[0].invocation;
21
- }
22
- };
23
- }
24
- __name(stellarLeafGenerator, "stellarLeafGenerator");
25
-
26
- export { stellarLeafGenerator };
27
- //# sourceMappingURL=2LBFEV2A.mjs.map
28
- //# sourceMappingURL=2LBFEV2A.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/leafGenerator.ts"],"names":["stellarLeafGenerator","leafs","encodeAddress","address","StrKey","decodeContract","Error","encodeCalls","calls","length","invocation"],"mappings":";;;AAkBO,SAASA,qBACZC,KAAAA,EAAwB;AAExB,EAAA,OAAO;AACHA,IAAAA,KAAAA;;AAGAC,IAAAA,aAAAA,CAAcC,OAAAA,EAAe;AACzB,MAAA,IAAI;AACA,QAAA,OAAOC,MAAAA,CAAOC,eAAeF,OAAAA,CAAAA;MACjC,CAAA,CAAA,MAAQ;AACJ,QAAA,MAAM,IAAIG,KAAAA,CAAM,CAAA,iCAAA,EAAoCH,OAAAA,CAAAA,gBAAAA,CAAyB,CAAA;AACjF,MAAA;AACJ,IAAA,CAAA;;AAGAI,IAAAA,WAAAA,CAAYC,KAAAA,EAAwB;AAChC,MAAA,IAAIA,KAAAA,CAAMC,WAAW,CAAA,EAAG;AACpB,QAAA,MAAM,IAAIH,KAAAA,CACN,CAAA,mDAAA,EAAsDE,KAAAA,CAAMC,MAAM,CAAA,CAAE,CAAA;AAE5E,MAAA;AACA,MAAA,OAAOD,KAAAA,CAAM,CAAA,CAAA,CAAGE,UAAAA;AACpB,IAAA;AACJ,GAAA;AACJ;AAzBgBV,MAAAA,CAAAA,oBAAAA,EAAAA,sBAAAA,CAAAA","file":"2LBFEV2A.mjs","sourcesContent":["import { StrKey } from '@stellar/stellar-sdk';\n\nimport { type BaseLeafData, type GenerateLeafsResult } from '@layerzerolabs/onesig-core';\n\n/** A single Stellar call carried inside a merkle leaf. */\nexport interface StellarCallData {\n /** XDR-encoded `SorobanAuthorizedInvocation` buffer. */\n invocation: Buffer;\n}\n\n/**\n * Leaf data for Stellar OneSig where each \"call\" wraps a raw XDR-encoded\n * `SorobanAuthorizedInvocation` buffer. Each leaf contains exactly one\n * call in its `calls` array.\n */\nexport type StellarLeafData = BaseLeafData<string, StellarCallData>;\n\n/** Generates Stellar leaf data for OneSig Merkle tree */\nexport function stellarLeafGenerator(\n leafs: StellarLeafData[],\n): GenerateLeafsResult<StellarLeafData> {\n return {\n leafs,\n\n /** Encode OneSig contract address (C...) to 32-byte buffer */\n encodeAddress(address: string): Buffer {\n try {\n return StrKey.decodeContract(address);\n } catch {\n throw new Error(`Invalid OneSig contract address: ${address}. Expected: C...`);\n }\n },\n\n /** Encode invocation XDR for leaf hashing. Expects exactly one call. */\n encodeCalls(calls: StellarCallData[]): Buffer {\n if (calls.length !== 1) {\n throw new Error(\n `Stellar leaf must have exactly one invocation, got ${calls.length}`,\n );\n }\n return calls[0].invocation;\n },\n };\n}\n"]}