@buildonspark/issuer-sdk 0.1.34 → 0.1.36
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/CHANGELOG.md +15 -0
- package/dist/index.browser.d.ts +2 -1
- package/dist/index.browser.js +102 -92
- package/dist/index.node.cjs +102 -92
- package/dist/index.node.d.cts +2 -1
- package/dist/index.node.d.ts +2 -1
- package/dist/index.node.js +102 -92
- package/dist/native/index.react-native.cjs +102 -92
- package/dist/native/index.react-native.d.cts +2 -1
- package/dist/native/index.react-native.d.ts +2 -1
- package/dist/native/index.react-native.js +102 -92
- package/package.json +9 -6
- package/src/issuer-wallet/issuer-spark-wallet.react-native.ts +0 -1
- package/src/issuer-wallet/issuer-spark-wallet.ts +20 -15
- package/src/issuer-wallet/types.ts +2 -1
- package/src/services/freeze.ts +3 -3
- package/src/services/token-transactions.ts +109 -101
- package/src/tests/integration/multi-token-issuer.test.ts +3 -10
- package/src/tests/integration/test-configs.ts +1 -1
- package/src/tests/integration/token-invoices.test.ts +13 -14
- package/src/tests/integration/token-lifecycle.test.ts +5 -5
- package/src/tests/integration/token-monitoring.test.ts +31 -43
- package/src/tests/integration/token-outputs.test.ts +7 -7
- package/src/tests/integration/token-transfers.test.ts +23 -23
- package/src/tests/stress/transfers.test.ts +10 -8
- package/src/tests/utils/issuer-test-wallet.ts +9 -3
- package/src/utils/token-hashing.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @buildonspark/issuer-sdk
|
|
2
2
|
|
|
3
|
+
## 0.1.36
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- Updated dependencies [d4ef15a]
|
|
9
|
+
- @buildonspark/spark-sdk@0.8.0
|
|
10
|
+
|
|
11
|
+
## 0.1.35
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [26d7b8e]
|
|
16
|
+
- @buildonspark/spark-sdk@0.7.17
|
|
17
|
+
|
|
3
18
|
## 0.1.34
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/index.browser.d.ts
CHANGED
|
@@ -6,7 +6,8 @@ import { OutputWithPreviousTransactionData, TokenOutputRef } from "@buildonspark
|
|
|
6
6
|
* Token metadata containing essential information about issuer's token.
|
|
7
7
|
* This is the wallet's internal representation with JavaScript-friendly types.
|
|
8
8
|
*
|
|
9
|
-
* rawTokenIdentifier: This is the raw binary token identifier - This is used to encode the human
|
|
9
|
+
* rawTokenIdentifier: This is the raw binary token identifier - This is used to encode the human
|
|
10
|
+
* readable token identifier.
|
|
10
11
|
*
|
|
11
12
|
* tokenPublicKey: This is the hex-encoded public key of the token issuer - Same as issuerPublicKey.
|
|
12
13
|
*
|
package/dist/index.browser.js
CHANGED
|
@@ -9,7 +9,7 @@ function hashFreezeTokensPayload(payload) {
|
|
|
9
9
|
value: payload,
|
|
10
10
|
expected: "valid freeze tokens payload"
|
|
11
11
|
});
|
|
12
|
-
|
|
12
|
+
const allHashes = [];
|
|
13
13
|
const versionHashObj = sha256.create();
|
|
14
14
|
const versionBytes = new Uint8Array(4);
|
|
15
15
|
new DataView(versionBytes.buffer).setUint32(0, payload.version, false);
|
|
@@ -93,101 +93,109 @@ var IssuerTokenTransactionService = class extends TokenTransactionService {
|
|
|
93
93
|
constructor(config, connectionManager) {
|
|
94
94
|
super(config, connectionManager);
|
|
95
95
|
}
|
|
96
|
-
|
|
97
|
-
return {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
tokenInputs: {
|
|
101
|
-
$case: "mintInput",
|
|
102
|
-
mintInput: {
|
|
103
|
-
issuerPublicKey: issuerTokenPublicKey,
|
|
104
|
-
tokenIdentifier: rawTokenIdentifierBytes
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
tokenOutputs: [{
|
|
108
|
-
ownerPublicKey: issuerTokenPublicKey,
|
|
109
|
-
tokenIdentifier: rawTokenIdentifierBytes,
|
|
110
|
-
tokenAmount: numberToBytesBE(tokenAmount, 16)
|
|
111
|
-
}],
|
|
112
|
-
clientCreatedTimestamp: /* @__PURE__ */ new Date(),
|
|
113
|
-
sparkOperatorIdentityPublicKeys: super.collectOperatorIdentityPublicKeys(),
|
|
114
|
-
expiryTime: void 0,
|
|
115
|
-
invoiceAttachments: []
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
async constructPartialMintTokenTransaction(rawTokenIdentifierBytes, issuerTokenPublicKey, tokenAmount) {
|
|
119
|
-
return {
|
|
120
|
-
version: 3,
|
|
121
|
-
tokenTransactionMetadata: {
|
|
96
|
+
constructMintTokenTransaction(rawTokenIdentifierBytes, issuerTokenPublicKey, tokenAmount) {
|
|
97
|
+
return new Promise((resolve) => {
|
|
98
|
+
resolve({
|
|
99
|
+
version: 2,
|
|
122
100
|
network: this.config.getNetworkProto(),
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
101
|
+
tokenInputs: {
|
|
102
|
+
$case: "mintInput",
|
|
103
|
+
mintInput: {
|
|
104
|
+
issuerPublicKey: issuerTokenPublicKey,
|
|
105
|
+
tokenIdentifier: rawTokenIdentifierBytes
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
tokenOutputs: [{
|
|
109
|
+
ownerPublicKey: issuerTokenPublicKey,
|
|
110
|
+
tokenIdentifier: rawTokenIdentifierBytes,
|
|
111
|
+
tokenAmount: numberToBytesBE(tokenAmount, 16)
|
|
112
|
+
}],
|
|
113
|
+
clientCreatedTimestamp: /* @__PURE__ */ new Date(),
|
|
114
|
+
sparkOperatorIdentityPublicKeys: super.collectOperatorIdentityPublicKeys(),
|
|
115
|
+
expiryTime: void 0,
|
|
126
116
|
invoiceAttachments: []
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
$case: "mintInput",
|
|
130
|
-
mintInput: {
|
|
131
|
-
issuerPublicKey: issuerTokenPublicKey,
|
|
132
|
-
tokenIdentifier: rawTokenIdentifierBytes
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
partialTokenOutputs: [{
|
|
136
|
-
ownerPublicKey: issuerTokenPublicKey,
|
|
137
|
-
tokenIdentifier: rawTokenIdentifierBytes,
|
|
138
|
-
withdrawBondSats: this.config.getExpectedWithdrawBondSats(),
|
|
139
|
-
withdrawRelativeBlockLocktime: this.config.getExpectedWithdrawRelativeBlockLocktime(),
|
|
140
|
-
tokenAmount: numberToBytesBE(tokenAmount, 16)
|
|
141
|
-
}]
|
|
142
|
-
};
|
|
117
|
+
});
|
|
118
|
+
});
|
|
143
119
|
}
|
|
144
|
-
|
|
145
|
-
return {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
120
|
+
constructPartialMintTokenTransaction(rawTokenIdentifierBytes, issuerTokenPublicKey, tokenAmount) {
|
|
121
|
+
return new Promise((resolve) => {
|
|
122
|
+
resolve({
|
|
123
|
+
version: 3,
|
|
124
|
+
tokenTransactionMetadata: {
|
|
125
|
+
network: this.config.getNetworkProto(),
|
|
126
|
+
sparkOperatorIdentityPublicKeys: this.collectOperatorIdentityPublicKeys(),
|
|
127
|
+
validityDurationSeconds: this.config.getTokenValidityDurationSeconds(),
|
|
128
|
+
clientCreatedTimestamp: this.connectionManager.getCurrentServerTime(),
|
|
129
|
+
invoiceAttachments: []
|
|
130
|
+
},
|
|
131
|
+
tokenInputs: {
|
|
132
|
+
$case: "mintInput",
|
|
133
|
+
mintInput: {
|
|
134
|
+
issuerPublicKey: issuerTokenPublicKey,
|
|
135
|
+
tokenIdentifier: rawTokenIdentifierBytes
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
partialTokenOutputs: [{
|
|
139
|
+
ownerPublicKey: issuerTokenPublicKey,
|
|
140
|
+
tokenIdentifier: rawTokenIdentifierBytes,
|
|
141
|
+
withdrawBondSats: this.config.getExpectedWithdrawBondSats(),
|
|
142
|
+
withdrawRelativeBlockLocktime: this.config.getExpectedWithdrawRelativeBlockLocktime(),
|
|
143
|
+
tokenAmount: numberToBytesBE(tokenAmount, 16)
|
|
144
|
+
}]
|
|
145
|
+
});
|
|
146
|
+
});
|
|
166
147
|
}
|
|
167
|
-
|
|
168
|
-
return {
|
|
169
|
-
|
|
170
|
-
|
|
148
|
+
constructCreateTokenTransaction(tokenPublicKey, tokenName, tokenTicker, decimals, maxSupply, isFreezable, extraMetadata) {
|
|
149
|
+
return new Promise((resolve) => {
|
|
150
|
+
resolve({
|
|
151
|
+
version: 2,
|
|
171
152
|
network: this.config.getNetworkProto(),
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
153
|
+
tokenInputs: {
|
|
154
|
+
$case: "createInput",
|
|
155
|
+
createInput: {
|
|
156
|
+
issuerPublicKey: tokenPublicKey,
|
|
157
|
+
tokenName,
|
|
158
|
+
tokenTicker,
|
|
159
|
+
decimals,
|
|
160
|
+
maxSupply: numberToBytesBE(maxSupply, 16),
|
|
161
|
+
isFreezable,
|
|
162
|
+
extraMetadata
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
tokenOutputs: [],
|
|
166
|
+
clientCreatedTimestamp: /* @__PURE__ */ new Date(),
|
|
167
|
+
sparkOperatorIdentityPublicKeys: super.collectOperatorIdentityPublicKeys(),
|
|
168
|
+
expiryTime: void 0,
|
|
175
169
|
invoiceAttachments: []
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
constructPartialCreateTokenTransaction(tokenPublicKey, tokenName, tokenTicker, decimals, maxSupply, isFreezable, extraMetadata) {
|
|
174
|
+
return new Promise((resolve) => {
|
|
175
|
+
resolve({
|
|
176
|
+
version: 3,
|
|
177
|
+
tokenTransactionMetadata: {
|
|
178
|
+
network: this.config.getNetworkProto(),
|
|
179
|
+
sparkOperatorIdentityPublicKeys: this.collectOperatorIdentityPublicKeys(),
|
|
180
|
+
validityDurationSeconds: this.config.getTokenValidityDurationSeconds(),
|
|
181
|
+
clientCreatedTimestamp: this.connectionManager.getCurrentServerTime(),
|
|
182
|
+
invoiceAttachments: []
|
|
183
|
+
},
|
|
184
|
+
tokenInputs: {
|
|
185
|
+
$case: "createInput",
|
|
186
|
+
createInput: {
|
|
187
|
+
issuerPublicKey: tokenPublicKey,
|
|
188
|
+
tokenName,
|
|
189
|
+
tokenTicker,
|
|
190
|
+
decimals,
|
|
191
|
+
maxSupply: numberToBytesBE(maxSupply, 16),
|
|
192
|
+
isFreezable,
|
|
193
|
+
extraMetadata
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
partialTokenOutputs: []
|
|
197
|
+
});
|
|
198
|
+
});
|
|
191
199
|
}
|
|
192
200
|
};
|
|
193
201
|
|
|
@@ -576,8 +584,10 @@ var IssuerSparkWallet = class extends SparkWallet {
|
|
|
576
584
|
* Retrieves the distribution information for the issuer's token.
|
|
577
585
|
* @throws {SparkError} This feature is not yet supported
|
|
578
586
|
*/
|
|
579
|
-
|
|
580
|
-
|
|
587
|
+
getIssuerTokenDistribution() {
|
|
588
|
+
return new Promise((_, reject) => {
|
|
589
|
+
reject(new SparkError("Token distribution is not yet supported"));
|
|
590
|
+
});
|
|
581
591
|
}
|
|
582
592
|
/**
|
|
583
593
|
* This validates that the token belongs to this issuer.
|
package/dist/index.node.cjs
CHANGED
|
@@ -10,7 +10,7 @@ function hashFreezeTokensPayload(payload) {
|
|
|
10
10
|
value: payload,
|
|
11
11
|
expected: "valid freeze tokens payload"
|
|
12
12
|
});
|
|
13
|
-
|
|
13
|
+
const allHashes = [];
|
|
14
14
|
const versionHashObj = _scure_btc_signer_utils.sha256.create();
|
|
15
15
|
const versionBytes = new Uint8Array(4);
|
|
16
16
|
new DataView(versionBytes.buffer).setUint32(0, payload.version, false);
|
|
@@ -94,101 +94,109 @@ var IssuerTokenTransactionService = class extends _buildonspark_spark_sdk.TokenT
|
|
|
94
94
|
constructor(config, connectionManager) {
|
|
95
95
|
super(config, connectionManager);
|
|
96
96
|
}
|
|
97
|
-
|
|
98
|
-
return {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
tokenInputs: {
|
|
102
|
-
$case: "mintInput",
|
|
103
|
-
mintInput: {
|
|
104
|
-
issuerPublicKey: issuerTokenPublicKey,
|
|
105
|
-
tokenIdentifier: rawTokenIdentifierBytes
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
tokenOutputs: [{
|
|
109
|
-
ownerPublicKey: issuerTokenPublicKey,
|
|
110
|
-
tokenIdentifier: rawTokenIdentifierBytes,
|
|
111
|
-
tokenAmount: (0, _noble_curves_utils.numberToBytesBE)(tokenAmount, 16)
|
|
112
|
-
}],
|
|
113
|
-
clientCreatedTimestamp: /* @__PURE__ */ new Date(),
|
|
114
|
-
sparkOperatorIdentityPublicKeys: super.collectOperatorIdentityPublicKeys(),
|
|
115
|
-
expiryTime: void 0,
|
|
116
|
-
invoiceAttachments: []
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
async constructPartialMintTokenTransaction(rawTokenIdentifierBytes, issuerTokenPublicKey, tokenAmount) {
|
|
120
|
-
return {
|
|
121
|
-
version: 3,
|
|
122
|
-
tokenTransactionMetadata: {
|
|
97
|
+
constructMintTokenTransaction(rawTokenIdentifierBytes, issuerTokenPublicKey, tokenAmount) {
|
|
98
|
+
return new Promise((resolve) => {
|
|
99
|
+
resolve({
|
|
100
|
+
version: 2,
|
|
123
101
|
network: this.config.getNetworkProto(),
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
102
|
+
tokenInputs: {
|
|
103
|
+
$case: "mintInput",
|
|
104
|
+
mintInput: {
|
|
105
|
+
issuerPublicKey: issuerTokenPublicKey,
|
|
106
|
+
tokenIdentifier: rawTokenIdentifierBytes
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
tokenOutputs: [{
|
|
110
|
+
ownerPublicKey: issuerTokenPublicKey,
|
|
111
|
+
tokenIdentifier: rawTokenIdentifierBytes,
|
|
112
|
+
tokenAmount: (0, _noble_curves_utils.numberToBytesBE)(tokenAmount, 16)
|
|
113
|
+
}],
|
|
114
|
+
clientCreatedTimestamp: /* @__PURE__ */ new Date(),
|
|
115
|
+
sparkOperatorIdentityPublicKeys: super.collectOperatorIdentityPublicKeys(),
|
|
116
|
+
expiryTime: void 0,
|
|
127
117
|
invoiceAttachments: []
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
$case: "mintInput",
|
|
131
|
-
mintInput: {
|
|
132
|
-
issuerPublicKey: issuerTokenPublicKey,
|
|
133
|
-
tokenIdentifier: rawTokenIdentifierBytes
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
partialTokenOutputs: [{
|
|
137
|
-
ownerPublicKey: issuerTokenPublicKey,
|
|
138
|
-
tokenIdentifier: rawTokenIdentifierBytes,
|
|
139
|
-
withdrawBondSats: this.config.getExpectedWithdrawBondSats(),
|
|
140
|
-
withdrawRelativeBlockLocktime: this.config.getExpectedWithdrawRelativeBlockLocktime(),
|
|
141
|
-
tokenAmount: (0, _noble_curves_utils.numberToBytesBE)(tokenAmount, 16)
|
|
142
|
-
}]
|
|
143
|
-
};
|
|
118
|
+
});
|
|
119
|
+
});
|
|
144
120
|
}
|
|
145
|
-
|
|
146
|
-
return {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
121
|
+
constructPartialMintTokenTransaction(rawTokenIdentifierBytes, issuerTokenPublicKey, tokenAmount) {
|
|
122
|
+
return new Promise((resolve) => {
|
|
123
|
+
resolve({
|
|
124
|
+
version: 3,
|
|
125
|
+
tokenTransactionMetadata: {
|
|
126
|
+
network: this.config.getNetworkProto(),
|
|
127
|
+
sparkOperatorIdentityPublicKeys: this.collectOperatorIdentityPublicKeys(),
|
|
128
|
+
validityDurationSeconds: this.config.getTokenValidityDurationSeconds(),
|
|
129
|
+
clientCreatedTimestamp: this.connectionManager.getCurrentServerTime(),
|
|
130
|
+
invoiceAttachments: []
|
|
131
|
+
},
|
|
132
|
+
tokenInputs: {
|
|
133
|
+
$case: "mintInput",
|
|
134
|
+
mintInput: {
|
|
135
|
+
issuerPublicKey: issuerTokenPublicKey,
|
|
136
|
+
tokenIdentifier: rawTokenIdentifierBytes
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
partialTokenOutputs: [{
|
|
140
|
+
ownerPublicKey: issuerTokenPublicKey,
|
|
141
|
+
tokenIdentifier: rawTokenIdentifierBytes,
|
|
142
|
+
withdrawBondSats: this.config.getExpectedWithdrawBondSats(),
|
|
143
|
+
withdrawRelativeBlockLocktime: this.config.getExpectedWithdrawRelativeBlockLocktime(),
|
|
144
|
+
tokenAmount: (0, _noble_curves_utils.numberToBytesBE)(tokenAmount, 16)
|
|
145
|
+
}]
|
|
146
|
+
});
|
|
147
|
+
});
|
|
167
148
|
}
|
|
168
|
-
|
|
169
|
-
return {
|
|
170
|
-
|
|
171
|
-
|
|
149
|
+
constructCreateTokenTransaction(tokenPublicKey, tokenName, tokenTicker, decimals, maxSupply, isFreezable, extraMetadata) {
|
|
150
|
+
return new Promise((resolve) => {
|
|
151
|
+
resolve({
|
|
152
|
+
version: 2,
|
|
172
153
|
network: this.config.getNetworkProto(),
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
154
|
+
tokenInputs: {
|
|
155
|
+
$case: "createInput",
|
|
156
|
+
createInput: {
|
|
157
|
+
issuerPublicKey: tokenPublicKey,
|
|
158
|
+
tokenName,
|
|
159
|
+
tokenTicker,
|
|
160
|
+
decimals,
|
|
161
|
+
maxSupply: (0, _noble_curves_utils.numberToBytesBE)(maxSupply, 16),
|
|
162
|
+
isFreezable,
|
|
163
|
+
extraMetadata
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
tokenOutputs: [],
|
|
167
|
+
clientCreatedTimestamp: /* @__PURE__ */ new Date(),
|
|
168
|
+
sparkOperatorIdentityPublicKeys: super.collectOperatorIdentityPublicKeys(),
|
|
169
|
+
expiryTime: void 0,
|
|
176
170
|
invoiceAttachments: []
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
constructPartialCreateTokenTransaction(tokenPublicKey, tokenName, tokenTicker, decimals, maxSupply, isFreezable, extraMetadata) {
|
|
175
|
+
return new Promise((resolve) => {
|
|
176
|
+
resolve({
|
|
177
|
+
version: 3,
|
|
178
|
+
tokenTransactionMetadata: {
|
|
179
|
+
network: this.config.getNetworkProto(),
|
|
180
|
+
sparkOperatorIdentityPublicKeys: this.collectOperatorIdentityPublicKeys(),
|
|
181
|
+
validityDurationSeconds: this.config.getTokenValidityDurationSeconds(),
|
|
182
|
+
clientCreatedTimestamp: this.connectionManager.getCurrentServerTime(),
|
|
183
|
+
invoiceAttachments: []
|
|
184
|
+
},
|
|
185
|
+
tokenInputs: {
|
|
186
|
+
$case: "createInput",
|
|
187
|
+
createInput: {
|
|
188
|
+
issuerPublicKey: tokenPublicKey,
|
|
189
|
+
tokenName,
|
|
190
|
+
tokenTicker,
|
|
191
|
+
decimals,
|
|
192
|
+
maxSupply: (0, _noble_curves_utils.numberToBytesBE)(maxSupply, 16),
|
|
193
|
+
isFreezable,
|
|
194
|
+
extraMetadata
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
partialTokenOutputs: []
|
|
198
|
+
});
|
|
199
|
+
});
|
|
192
200
|
}
|
|
193
201
|
};
|
|
194
202
|
|
|
@@ -577,8 +585,10 @@ var IssuerSparkWallet = class extends _buildonspark_spark_sdk.SparkWallet {
|
|
|
577
585
|
* Retrieves the distribution information for the issuer's token.
|
|
578
586
|
* @throws {SparkError} This feature is not yet supported
|
|
579
587
|
*/
|
|
580
|
-
|
|
581
|
-
|
|
588
|
+
getIssuerTokenDistribution() {
|
|
589
|
+
return new Promise((_, reject) => {
|
|
590
|
+
reject(new _buildonspark_spark_sdk.SparkError("Token distribution is not yet supported"));
|
|
591
|
+
});
|
|
582
592
|
}
|
|
583
593
|
/**
|
|
584
594
|
* This validates that the token belongs to this issuer.
|
package/dist/index.node.d.cts
CHANGED
|
@@ -6,7 +6,8 @@ import { OutputWithPreviousTransactionData, TokenOutputRef } from "@buildonspark
|
|
|
6
6
|
* Token metadata containing essential information about issuer's token.
|
|
7
7
|
* This is the wallet's internal representation with JavaScript-friendly types.
|
|
8
8
|
*
|
|
9
|
-
* rawTokenIdentifier: This is the raw binary token identifier - This is used to encode the human
|
|
9
|
+
* rawTokenIdentifier: This is the raw binary token identifier - This is used to encode the human
|
|
10
|
+
* readable token identifier.
|
|
10
11
|
*
|
|
11
12
|
* tokenPublicKey: This is the hex-encoded public key of the token issuer - Same as issuerPublicKey.
|
|
12
13
|
*
|
package/dist/index.node.d.ts
CHANGED
|
@@ -6,7 +6,8 @@ import { OutputWithPreviousTransactionData, TokenOutputRef } from "@buildonspark
|
|
|
6
6
|
* Token metadata containing essential information about issuer's token.
|
|
7
7
|
* This is the wallet's internal representation with JavaScript-friendly types.
|
|
8
8
|
*
|
|
9
|
-
* rawTokenIdentifier: This is the raw binary token identifier - This is used to encode the human
|
|
9
|
+
* rawTokenIdentifier: This is the raw binary token identifier - This is used to encode the human
|
|
10
|
+
* readable token identifier.
|
|
10
11
|
*
|
|
11
12
|
* tokenPublicKey: This is the hex-encoded public key of the token issuer - Same as issuerPublicKey.
|
|
12
13
|
*
|