algosdk 3.4.0 → 3.5.1
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/README.md +4 -4
- package/dist/browser/algosdk.min.js +1 -1
- package/dist/browser/algosdk.min.js.map +1 -1
- package/dist/cjs/appAccess.js +261 -0
- package/dist/cjs/appAccess.js.map +1 -0
- package/dist/cjs/client/v2/indexer/models/types.js +266 -8
- package/dist/cjs/client/v2/indexer/models/types.js.map +1 -1
- package/dist/cjs/composer.js +13 -5
- package/dist/cjs/composer.js.map +1 -1
- package/dist/cjs/logicsig.js +54 -17
- package/dist/cjs/logicsig.js.map +1 -1
- package/dist/cjs/makeTxn.js +60 -12
- package/dist/cjs/makeTxn.js.map +1 -1
- package/dist/cjs/signing.js +4 -4
- package/dist/cjs/signing.js.map +1 -1
- package/dist/cjs/transaction.js +110 -0
- package/dist/cjs/transaction.js.map +1 -1
- package/dist/esm/appAccess.js +255 -0
- package/dist/esm/appAccess.js.map +1 -0
- package/dist/esm/client/v2/indexer/models/types.js +261 -6
- package/dist/esm/client/v2/indexer/models/types.js.map +1 -1
- package/dist/esm/composer.js +13 -5
- package/dist/esm/composer.js.map +1 -1
- package/dist/esm/logicsig.js +54 -17
- package/dist/esm/logicsig.js.map +1 -1
- package/dist/esm/makeTxn.js +60 -12
- package/dist/esm/makeTxn.js.map +1 -1
- package/dist/esm/signing.js +4 -4
- package/dist/esm/signing.js.map +1 -1
- package/dist/esm/transaction.js +110 -0
- package/dist/esm/transaction.js.map +1 -1
- package/dist/types/appAccess.d.ts +28 -0
- package/dist/types/client/v2/indexer/models/types.d.ts +157 -8
- package/dist/types/composer.d.ts +6 -2
- package/dist/types/logicsig.d.ts +2 -0
- package/dist/types/makeTxn.d.ts +9 -9
- package/dist/types/transaction.d.ts +18 -0
- package/dist/types/types/transactions/base.d.ts +76 -0
- package/package.json +1 -1
- package/src/appAccess.ts +298 -0
- package/src/client/v2/indexer/models/types.ts +423 -5
- package/src/composer.ts +24 -4
- package/src/logicsig.ts +68 -17
- package/src/makeTxn.ts +105 -12
- package/src/signing.ts +4 -4
- package/src/transaction.ts +168 -0
- package/src/types/transactions/base.ts +91 -0
|
@@ -1801,6 +1801,10 @@ export class Block {
|
|
|
1801
1801
|
key: 'participation-updates',
|
|
1802
1802
|
valueSchema: new OptionalSchema(ParticipationUpdates.encodingSchema),
|
|
1803
1803
|
omitEmpty: true,
|
|
1804
|
+
}, {
|
|
1805
|
+
key: 'previous-block-hash-512',
|
|
1806
|
+
valueSchema: new OptionalSchema(new ByteArraySchema()),
|
|
1807
|
+
omitEmpty: true,
|
|
1804
1808
|
}, {
|
|
1805
1809
|
key: 'proposer',
|
|
1806
1810
|
valueSchema: new OptionalSchema(new StringSchema()),
|
|
@@ -1821,6 +1825,10 @@ export class Block {
|
|
|
1821
1825
|
key: 'transactions',
|
|
1822
1826
|
valueSchema: new OptionalSchema(new ArraySchema(Transaction.encodingSchema)),
|
|
1823
1827
|
omitEmpty: true,
|
|
1828
|
+
}, {
|
|
1829
|
+
key: 'transactions-root-sha512',
|
|
1830
|
+
valueSchema: new OptionalSchema(new ByteArraySchema()),
|
|
1831
|
+
omitEmpty: true,
|
|
1824
1832
|
}, {
|
|
1825
1833
|
key: 'txn-counter',
|
|
1826
1834
|
valueSchema: new OptionalSchema(new Uint64Schema()),
|
|
@@ -1858,11 +1866,15 @@ export class Block {
|
|
|
1858
1866
|
* @param bonus - the potential bonus payout for this block.
|
|
1859
1867
|
* @param feesCollected - the sum of all fees paid by transactions in this block.
|
|
1860
1868
|
* @param participationUpdates - Participation account data that needs to be checked/acted on by the network.
|
|
1869
|
+
* @param previousBlockHash512 - (prev512) Previous block hash, using SHA-512.
|
|
1861
1870
|
* @param proposer - the proposer of this block.
|
|
1862
1871
|
* @param proposerPayout - the actual amount transferred to the proposer from the fee sink.
|
|
1863
1872
|
* @param rewards - Fields relating to rewards,
|
|
1864
1873
|
* @param stateProofTracking - Tracks the status of state proofs.
|
|
1865
1874
|
* @param transactions - (txns) list of transactions corresponding to a given round.
|
|
1875
|
+
* @param transactionsRootSha512 - (txn512) TransactionsRootSHA512 is an auxiliary TransactionRoot, built using a
|
|
1876
|
+
* vector commitment instead of a merkle tree, and SHA512 hash function instead of
|
|
1877
|
+
* the default SHA512_256.
|
|
1866
1878
|
* @param txnCounter - (tc) TxnCounter counts the number of transactions committed in the ledger, from
|
|
1867
1879
|
* the time at which support for this feature was introduced.
|
|
1868
1880
|
* Specifically, TxnCounter is the number of the next transaction that will be
|
|
@@ -1871,7 +1883,7 @@ export class Block {
|
|
|
1871
1883
|
* @param upgradeState - Fields relating to a protocol upgrade.
|
|
1872
1884
|
* @param upgradeVote - Fields relating to voting for a protocol upgrade.
|
|
1873
1885
|
*/
|
|
1874
|
-
constructor({ genesisHash, genesisId, previousBlockHash, round, seed, timestamp, transactionsRoot, transactionsRootSha256, bonus, feesCollected, participationUpdates, proposer, proposerPayout, rewards, stateProofTracking, transactions, txnCounter, upgradeState, upgradeVote, }) {
|
|
1886
|
+
constructor({ genesisHash, genesisId, previousBlockHash, round, seed, timestamp, transactionsRoot, transactionsRootSha256, bonus, feesCollected, participationUpdates, previousBlockHash512, proposer, proposerPayout, rewards, stateProofTracking, transactions, transactionsRootSha512, txnCounter, upgradeState, upgradeVote, }) {
|
|
1875
1887
|
this.genesisHash =
|
|
1876
1888
|
typeof genesisHash === 'string'
|
|
1877
1889
|
? base64ToBytes(genesisHash)
|
|
@@ -1899,6 +1911,10 @@ export class Block {
|
|
|
1899
1911
|
? undefined
|
|
1900
1912
|
: ensureSafeInteger(feesCollected);
|
|
1901
1913
|
this.participationUpdates = participationUpdates;
|
|
1914
|
+
this.previousBlockHash512 =
|
|
1915
|
+
typeof previousBlockHash512 === 'string'
|
|
1916
|
+
? base64ToBytes(previousBlockHash512)
|
|
1917
|
+
: previousBlockHash512;
|
|
1902
1918
|
this.proposer =
|
|
1903
1919
|
typeof proposer === 'string' ? Address.fromString(proposer) : proposer;
|
|
1904
1920
|
this.proposerPayout =
|
|
@@ -1908,6 +1924,10 @@ export class Block {
|
|
|
1908
1924
|
this.rewards = rewards;
|
|
1909
1925
|
this.stateProofTracking = stateProofTracking;
|
|
1910
1926
|
this.transactions = transactions;
|
|
1927
|
+
this.transactionsRootSha512 =
|
|
1928
|
+
typeof transactionsRootSha512 === 'string'
|
|
1929
|
+
? base64ToBytes(transactionsRootSha512)
|
|
1930
|
+
: transactionsRootSha512;
|
|
1911
1931
|
this.txnCounter =
|
|
1912
1932
|
typeof txnCounter === 'undefined'
|
|
1913
1933
|
? undefined
|
|
@@ -1937,6 +1957,7 @@ export class Block {
|
|
|
1937
1957
|
? this.participationUpdates.toEncodingData()
|
|
1938
1958
|
: undefined,
|
|
1939
1959
|
],
|
|
1960
|
+
['previous-block-hash-512', this.previousBlockHash512],
|
|
1940
1961
|
[
|
|
1941
1962
|
'proposer',
|
|
1942
1963
|
typeof this.proposer !== 'undefined'
|
|
@@ -1962,6 +1983,7 @@ export class Block {
|
|
|
1962
1983
|
? this.transactions.map((v) => v.toEncodingData())
|
|
1963
1984
|
: undefined,
|
|
1964
1985
|
],
|
|
1986
|
+
['transactions-root-sha512', this.transactionsRootSha512],
|
|
1965
1987
|
['txn-counter', this.txnCounter],
|
|
1966
1988
|
[
|
|
1967
1989
|
'upgrade-state',
|
|
@@ -1995,6 +2017,7 @@ export class Block {
|
|
|
1995
2017
|
participationUpdates: typeof data.get('participation-updates') !== 'undefined'
|
|
1996
2018
|
? ParticipationUpdates.fromEncodingData(data.get('participation-updates'))
|
|
1997
2019
|
: undefined,
|
|
2020
|
+
previousBlockHash512: data.get('previous-block-hash-512'),
|
|
1998
2021
|
proposer: data.get('proposer'),
|
|
1999
2022
|
proposerPayout: data.get('proposer-payout'),
|
|
2000
2023
|
rewards: typeof data.get('rewards') !== 'undefined'
|
|
@@ -2010,6 +2033,7 @@ export class Block {
|
|
|
2010
2033
|
.get('transactions')
|
|
2011
2034
|
.map((v) => Transaction.fromEncodingData(v))
|
|
2012
2035
|
: undefined,
|
|
2036
|
+
transactionsRootSha512: data.get('transactions-root-sha512'),
|
|
2013
2037
|
txnCounter: data.get('txn-counter'),
|
|
2014
2038
|
upgradeState: typeof data.get('upgrade-state') !== 'undefined'
|
|
2015
2039
|
? BlockUpgradeState.fromEncodingData(data.get('upgrade-state'))
|
|
@@ -2818,6 +2842,47 @@ export class HealthCheck {
|
|
|
2818
2842
|
});
|
|
2819
2843
|
}
|
|
2820
2844
|
}
|
|
2845
|
+
/**
|
|
2846
|
+
* HoldingRef names a holding by referring to an Address and Asset it belongs to.
|
|
2847
|
+
*/
|
|
2848
|
+
export class HoldingRef {
|
|
2849
|
+
static get encodingSchema() {
|
|
2850
|
+
if (!this.encodingSchemaValue) {
|
|
2851
|
+
this.encodingSchemaValue = new NamedMapSchema([]);
|
|
2852
|
+
this.encodingSchemaValue.pushEntries({ key: 'address', valueSchema: new StringSchema(), omitEmpty: true }, { key: 'asset', valueSchema: new Uint64Schema(), omitEmpty: true });
|
|
2853
|
+
}
|
|
2854
|
+
return this.encodingSchemaValue;
|
|
2855
|
+
}
|
|
2856
|
+
/**
|
|
2857
|
+
* Creates a new `HoldingRef` object.
|
|
2858
|
+
* @param address - (d) Address in access list, or the sender of the transaction.
|
|
2859
|
+
* @param asset - (s) Asset ID for asset in access list.
|
|
2860
|
+
*/
|
|
2861
|
+
constructor({ address, asset, }) {
|
|
2862
|
+
this.address =
|
|
2863
|
+
typeof address === 'string' ? Address.fromString(address) : address;
|
|
2864
|
+
this.asset = ensureSafeInteger(asset);
|
|
2865
|
+
}
|
|
2866
|
+
// eslint-disable-next-line class-methods-use-this
|
|
2867
|
+
getEncodingSchema() {
|
|
2868
|
+
return HoldingRef.encodingSchema;
|
|
2869
|
+
}
|
|
2870
|
+
toEncodingData() {
|
|
2871
|
+
return new Map([
|
|
2872
|
+
['address', this.address.toString()],
|
|
2873
|
+
['asset', this.asset],
|
|
2874
|
+
]);
|
|
2875
|
+
}
|
|
2876
|
+
static fromEncodingData(data) {
|
|
2877
|
+
if (!(data instanceof Map)) {
|
|
2878
|
+
throw new Error(`Invalid decoded HoldingRef: ${data}`);
|
|
2879
|
+
}
|
|
2880
|
+
return new HoldingRef({
|
|
2881
|
+
address: data.get('address'),
|
|
2882
|
+
asset: data.get('asset'),
|
|
2883
|
+
});
|
|
2884
|
+
}
|
|
2885
|
+
}
|
|
2821
2886
|
export class IndexerStateProofMessage {
|
|
2822
2887
|
static get encodingSchema() {
|
|
2823
2888
|
if (!this.encodingSchemaValue) {
|
|
@@ -2902,6 +2967,48 @@ export class IndexerStateProofMessage {
|
|
|
2902
2967
|
});
|
|
2903
2968
|
}
|
|
2904
2969
|
}
|
|
2970
|
+
/**
|
|
2971
|
+
* LocalsRef names a local state by referring to an Address and App it belongs to.
|
|
2972
|
+
*/
|
|
2973
|
+
export class LocalsRef {
|
|
2974
|
+
static get encodingSchema() {
|
|
2975
|
+
if (!this.encodingSchemaValue) {
|
|
2976
|
+
this.encodingSchemaValue = new NamedMapSchema([]);
|
|
2977
|
+
this.encodingSchemaValue.pushEntries({ key: 'address', valueSchema: new StringSchema(), omitEmpty: true }, { key: 'app', valueSchema: new Uint64Schema(), omitEmpty: true });
|
|
2978
|
+
}
|
|
2979
|
+
return this.encodingSchemaValue;
|
|
2980
|
+
}
|
|
2981
|
+
/**
|
|
2982
|
+
* Creates a new `LocalsRef` object.
|
|
2983
|
+
* @param address - (d) Address in access list, or the sender of the transaction.
|
|
2984
|
+
* @param app - (p) Application ID for app in access list, or zero if referring to the called
|
|
2985
|
+
* application.
|
|
2986
|
+
*/
|
|
2987
|
+
constructor({ address, app, }) {
|
|
2988
|
+
this.address =
|
|
2989
|
+
typeof address === 'string' ? Address.fromString(address) : address;
|
|
2990
|
+
this.app = ensureSafeInteger(app);
|
|
2991
|
+
}
|
|
2992
|
+
// eslint-disable-next-line class-methods-use-this
|
|
2993
|
+
getEncodingSchema() {
|
|
2994
|
+
return LocalsRef.encodingSchema;
|
|
2995
|
+
}
|
|
2996
|
+
toEncodingData() {
|
|
2997
|
+
return new Map([
|
|
2998
|
+
['address', this.address.toString()],
|
|
2999
|
+
['app', this.app],
|
|
3000
|
+
]);
|
|
3001
|
+
}
|
|
3002
|
+
static fromEncodingData(data) {
|
|
3003
|
+
if (!(data instanceof Map)) {
|
|
3004
|
+
throw new Error(`Invalid decoded LocalsRef: ${data}`);
|
|
3005
|
+
}
|
|
3006
|
+
return new LocalsRef({
|
|
3007
|
+
address: data.get('address'),
|
|
3008
|
+
app: data.get('app'),
|
|
3009
|
+
});
|
|
3010
|
+
}
|
|
3011
|
+
}
|
|
2905
3012
|
export class MerkleArrayProof {
|
|
2906
3013
|
static get encodingSchema() {
|
|
2907
3014
|
if (!this.encodingSchemaValue) {
|
|
@@ -3088,6 +3195,118 @@ export class ParticipationUpdates {
|
|
|
3088
3195
|
});
|
|
3089
3196
|
}
|
|
3090
3197
|
}
|
|
3198
|
+
/**
|
|
3199
|
+
* ResourceRef names a single resource. Only one of the fields should be set.
|
|
3200
|
+
*/
|
|
3201
|
+
export class ResourceRef {
|
|
3202
|
+
static get encodingSchema() {
|
|
3203
|
+
if (!this.encodingSchemaValue) {
|
|
3204
|
+
this.encodingSchemaValue = new NamedMapSchema([]);
|
|
3205
|
+
this.encodingSchemaValue.pushEntries({
|
|
3206
|
+
key: 'address',
|
|
3207
|
+
valueSchema: new OptionalSchema(new StringSchema()),
|
|
3208
|
+
omitEmpty: true,
|
|
3209
|
+
}, {
|
|
3210
|
+
key: 'application-id',
|
|
3211
|
+
valueSchema: new OptionalSchema(new Uint64Schema()),
|
|
3212
|
+
omitEmpty: true,
|
|
3213
|
+
}, {
|
|
3214
|
+
key: 'asset-id',
|
|
3215
|
+
valueSchema: new OptionalSchema(new Uint64Schema()),
|
|
3216
|
+
omitEmpty: true,
|
|
3217
|
+
}, {
|
|
3218
|
+
key: 'box',
|
|
3219
|
+
valueSchema: new OptionalSchema(BoxReference.encodingSchema),
|
|
3220
|
+
omitEmpty: true,
|
|
3221
|
+
}, {
|
|
3222
|
+
key: 'holding',
|
|
3223
|
+
valueSchema: new OptionalSchema(HoldingRef.encodingSchema),
|
|
3224
|
+
omitEmpty: true,
|
|
3225
|
+
}, {
|
|
3226
|
+
key: 'local',
|
|
3227
|
+
valueSchema: new OptionalSchema(LocalsRef.encodingSchema),
|
|
3228
|
+
omitEmpty: true,
|
|
3229
|
+
});
|
|
3230
|
+
}
|
|
3231
|
+
return this.encodingSchemaValue;
|
|
3232
|
+
}
|
|
3233
|
+
/**
|
|
3234
|
+
* Creates a new `ResourceRef` object.
|
|
3235
|
+
* @param address - (d) Account whose balance record is accessible by the executing ApprovalProgram
|
|
3236
|
+
* or ClearStateProgram.
|
|
3237
|
+
* @param applicationId - (p) Application id whose GlobalState may be read by the executing
|
|
3238
|
+
* ApprovalProgram or ClearStateProgram.
|
|
3239
|
+
* @param assetId - (s) Asset whose AssetParams may be read by the executing
|
|
3240
|
+
* ApprovalProgram or ClearStateProgram.
|
|
3241
|
+
* @param box - BoxReference names a box by its name and the application ID it belongs to.
|
|
3242
|
+
* @param holding - HoldingRef names a holding by referring to an Address and Asset it belongs to.
|
|
3243
|
+
* @param local - LocalsRef names a local state by referring to an Address and App it belongs to.
|
|
3244
|
+
*/
|
|
3245
|
+
constructor({ address, applicationId, assetId, box, holding, local, }) {
|
|
3246
|
+
this.address =
|
|
3247
|
+
typeof address === 'string' ? Address.fromString(address) : address;
|
|
3248
|
+
this.applicationId =
|
|
3249
|
+
typeof applicationId === 'undefined'
|
|
3250
|
+
? undefined
|
|
3251
|
+
: ensureSafeInteger(applicationId);
|
|
3252
|
+
this.assetId =
|
|
3253
|
+
typeof assetId === 'undefined' ? undefined : ensureSafeInteger(assetId);
|
|
3254
|
+
this.box = box;
|
|
3255
|
+
this.holding = holding;
|
|
3256
|
+
this.local = local;
|
|
3257
|
+
}
|
|
3258
|
+
// eslint-disable-next-line class-methods-use-this
|
|
3259
|
+
getEncodingSchema() {
|
|
3260
|
+
return ResourceRef.encodingSchema;
|
|
3261
|
+
}
|
|
3262
|
+
toEncodingData() {
|
|
3263
|
+
return new Map([
|
|
3264
|
+
[
|
|
3265
|
+
'address',
|
|
3266
|
+
typeof this.address !== 'undefined'
|
|
3267
|
+
? this.address.toString()
|
|
3268
|
+
: undefined,
|
|
3269
|
+
],
|
|
3270
|
+
['application-id', this.applicationId],
|
|
3271
|
+
['asset-id', this.assetId],
|
|
3272
|
+
[
|
|
3273
|
+
'box',
|
|
3274
|
+
typeof this.box !== 'undefined' ? this.box.toEncodingData() : undefined,
|
|
3275
|
+
],
|
|
3276
|
+
[
|
|
3277
|
+
'holding',
|
|
3278
|
+
typeof this.holding !== 'undefined'
|
|
3279
|
+
? this.holding.toEncodingData()
|
|
3280
|
+
: undefined,
|
|
3281
|
+
],
|
|
3282
|
+
[
|
|
3283
|
+
'local',
|
|
3284
|
+
typeof this.local !== 'undefined'
|
|
3285
|
+
? this.local.toEncodingData()
|
|
3286
|
+
: undefined,
|
|
3287
|
+
],
|
|
3288
|
+
]);
|
|
3289
|
+
}
|
|
3290
|
+
static fromEncodingData(data) {
|
|
3291
|
+
if (!(data instanceof Map)) {
|
|
3292
|
+
throw new Error(`Invalid decoded ResourceRef: ${data}`);
|
|
3293
|
+
}
|
|
3294
|
+
return new ResourceRef({
|
|
3295
|
+
address: data.get('address'),
|
|
3296
|
+
applicationId: data.get('application-id'),
|
|
3297
|
+
assetId: data.get('asset-id'),
|
|
3298
|
+
box: typeof data.get('box') !== 'undefined'
|
|
3299
|
+
? BoxReference.fromEncodingData(data.get('box'))
|
|
3300
|
+
: undefined,
|
|
3301
|
+
holding: typeof data.get('holding') !== 'undefined'
|
|
3302
|
+
? HoldingRef.fromEncodingData(data.get('holding'))
|
|
3303
|
+
: undefined,
|
|
3304
|
+
local: typeof data.get('local') !== 'undefined'
|
|
3305
|
+
? LocalsRef.fromEncodingData(data.get('local'))
|
|
3306
|
+
: undefined,
|
|
3307
|
+
});
|
|
3308
|
+
}
|
|
3309
|
+
}
|
|
3091
3310
|
/**
|
|
3092
3311
|
* (sp) represents a state proof.
|
|
3093
3312
|
* Definition:
|
|
@@ -4208,6 +4427,10 @@ export class TransactionApplication {
|
|
|
4208
4427
|
key: 'application-id',
|
|
4209
4428
|
valueSchema: new Uint64Schema(),
|
|
4210
4429
|
omitEmpty: true,
|
|
4430
|
+
}, {
|
|
4431
|
+
key: 'access',
|
|
4432
|
+
valueSchema: new OptionalSchema(new ArraySchema(ResourceRef.encodingSchema)),
|
|
4433
|
+
omitEmpty: true,
|
|
4211
4434
|
}, {
|
|
4212
4435
|
key: 'accounts',
|
|
4213
4436
|
valueSchema: new OptionalSchema(new ArraySchema(new StringSchema())),
|
|
@@ -4263,6 +4486,9 @@ export class TransactionApplication {
|
|
|
4263
4486
|
/**
|
|
4264
4487
|
* Creates a new `TransactionApplication` object.
|
|
4265
4488
|
* @param applicationId - (apid) ID of the application being configured or empty if creating.
|
|
4489
|
+
* @param access - (al) Access unifies `accounts`, `foreign-apps`, `foreign-assets`, and
|
|
4490
|
+
* `box-references` under a single list. If access is non-empty, these lists must
|
|
4491
|
+
* be empty. If access is empty, those lists may be non-empty.
|
|
4266
4492
|
* @param accounts - (apat) List of accounts in addition to the sender that may be accessed from the
|
|
4267
4493
|
* application's approval-program and clear-state-program.
|
|
4268
4494
|
* @param applicationArgs - (apaa) transaction specific arguments accessed from the application's
|
|
@@ -4303,8 +4529,9 @@ export class TransactionApplication {
|
|
|
4303
4529
|
* @param rejectVersion - (aprv) the lowest application version for which this transaction should
|
|
4304
4530
|
* immediately fail. 0 indicates that no version check should be performed.
|
|
4305
4531
|
*/
|
|
4306
|
-
constructor({ applicationId, accounts, applicationArgs, approvalProgram, boxReferences, clearStateProgram, extraProgramPages, foreignApps, foreignAssets, globalStateSchema, localStateSchema, onCompletion, rejectVersion, }) {
|
|
4532
|
+
constructor({ applicationId, access, accounts, applicationArgs, approvalProgram, boxReferences, clearStateProgram, extraProgramPages, foreignApps, foreignAssets, globalStateSchema, localStateSchema, onCompletion, rejectVersion, }) {
|
|
4307
4533
|
this.applicationId = ensureBigInt(applicationId);
|
|
4534
|
+
this.access = access;
|
|
4308
4535
|
this.accounts =
|
|
4309
4536
|
typeof accounts !== 'undefined'
|
|
4310
4537
|
? accounts.map((addr) => typeof addr === 'string' ? Address.fromString(addr) : addr)
|
|
@@ -4346,6 +4573,12 @@ export class TransactionApplication {
|
|
|
4346
4573
|
toEncodingData() {
|
|
4347
4574
|
return new Map([
|
|
4348
4575
|
['application-id', this.applicationId],
|
|
4576
|
+
[
|
|
4577
|
+
'access',
|
|
4578
|
+
typeof this.access !== 'undefined'
|
|
4579
|
+
? this.access.map((v) => v.toEncodingData())
|
|
4580
|
+
: undefined,
|
|
4581
|
+
],
|
|
4349
4582
|
[
|
|
4350
4583
|
'accounts',
|
|
4351
4584
|
typeof this.accounts !== 'undefined'
|
|
@@ -4386,6 +4619,11 @@ export class TransactionApplication {
|
|
|
4386
4619
|
}
|
|
4387
4620
|
return new TransactionApplication({
|
|
4388
4621
|
applicationId: data.get('application-id'),
|
|
4622
|
+
access: typeof data.get('access') !== 'undefined'
|
|
4623
|
+
? data
|
|
4624
|
+
.get('access')
|
|
4625
|
+
.map((v) => ResourceRef.fromEncodingData(v))
|
|
4626
|
+
: undefined,
|
|
4389
4627
|
accounts: data.get('accounts'),
|
|
4390
4628
|
applicationArgs: data.get('application-args'),
|
|
4391
4629
|
approvalProgram: data.get('approval-program'),
|
|
@@ -4922,7 +5160,7 @@ export class TransactionSignature {
|
|
|
4922
5160
|
* @param logicsig - (lsig) Programatic transaction signature.
|
|
4923
5161
|
* Definition:
|
|
4924
5162
|
* data/transactions/logicsig.go
|
|
4925
|
-
* @param multisig -
|
|
5163
|
+
* @param multisig - structure holding multiple subsignatures.
|
|
4926
5164
|
* Definition:
|
|
4927
5165
|
* crypto/multisig.go : MultisigSig
|
|
4928
5166
|
* @param sig - (sig) Standard ed25519 signature.
|
|
@@ -4981,6 +5219,10 @@ export class TransactionSignatureLogicsig {
|
|
|
4981
5219
|
key: 'args',
|
|
4982
5220
|
valueSchema: new OptionalSchema(new ArraySchema(new ByteArraySchema())),
|
|
4983
5221
|
omitEmpty: true,
|
|
5222
|
+
}, {
|
|
5223
|
+
key: 'logic-multisig-signature',
|
|
5224
|
+
valueSchema: new OptionalSchema(TransactionSignatureMultisig.encodingSchema),
|
|
5225
|
+
omitEmpty: true,
|
|
4984
5226
|
}, {
|
|
4985
5227
|
key: 'multisig-signature',
|
|
4986
5228
|
valueSchema: new OptionalSchema(TransactionSignatureMultisig.encodingSchema),
|
|
@@ -4998,14 +5240,18 @@ export class TransactionSignatureLogicsig {
|
|
|
4998
5240
|
* @param logic - (l) Program signed by a signature or multi signature, or hashed to be the
|
|
4999
5241
|
* address of ana ccount. Base64 encoded TEAL program.
|
|
5000
5242
|
* @param args - (arg) Logic arguments, base64 encoded.
|
|
5001
|
-
* @param
|
|
5243
|
+
* @param logicMultisigSignature - structure holding multiple subsignatures.
|
|
5244
|
+
* Definition:
|
|
5245
|
+
* crypto/multisig.go : MultisigSig
|
|
5246
|
+
* @param multisigSignature - structure holding multiple subsignatures.
|
|
5002
5247
|
* Definition:
|
|
5003
5248
|
* crypto/multisig.go : MultisigSig
|
|
5004
5249
|
* @param signature - (sig) ed25519 signature.
|
|
5005
5250
|
*/
|
|
5006
|
-
constructor({ logic, args, multisigSignature, signature, }) {
|
|
5251
|
+
constructor({ logic, args, logicMultisigSignature, multisigSignature, signature, }) {
|
|
5007
5252
|
this.logic = typeof logic === 'string' ? base64ToBytes(logic) : logic;
|
|
5008
5253
|
this.args = args;
|
|
5254
|
+
this.logicMultisigSignature = logicMultisigSignature;
|
|
5009
5255
|
this.multisigSignature = multisigSignature;
|
|
5010
5256
|
this.signature =
|
|
5011
5257
|
typeof signature === 'string' ? base64ToBytes(signature) : signature;
|
|
@@ -5018,6 +5264,12 @@ export class TransactionSignatureLogicsig {
|
|
|
5018
5264
|
return new Map([
|
|
5019
5265
|
['logic', this.logic],
|
|
5020
5266
|
['args', this.args],
|
|
5267
|
+
[
|
|
5268
|
+
'logic-multisig-signature',
|
|
5269
|
+
typeof this.logicMultisigSignature !== 'undefined'
|
|
5270
|
+
? this.logicMultisigSignature.toEncodingData()
|
|
5271
|
+
: undefined,
|
|
5272
|
+
],
|
|
5021
5273
|
[
|
|
5022
5274
|
'multisig-signature',
|
|
5023
5275
|
typeof this.multisigSignature !== 'undefined'
|
|
@@ -5034,6 +5286,9 @@ export class TransactionSignatureLogicsig {
|
|
|
5034
5286
|
return new TransactionSignatureLogicsig({
|
|
5035
5287
|
logic: data.get('logic'),
|
|
5036
5288
|
args: data.get('args'),
|
|
5289
|
+
logicMultisigSignature: typeof data.get('logic-multisig-signature') !== 'undefined'
|
|
5290
|
+
? TransactionSignatureMultisig.fromEncodingData(data.get('logic-multisig-signature'))
|
|
5291
|
+
: undefined,
|
|
5037
5292
|
multisigSignature: typeof data.get('multisig-signature') !== 'undefined'
|
|
5038
5293
|
? TransactionSignatureMultisig.fromEncodingData(data.get('multisig-signature'))
|
|
5039
5294
|
: undefined,
|
|
@@ -5042,7 +5297,7 @@ export class TransactionSignatureLogicsig {
|
|
|
5042
5297
|
}
|
|
5043
5298
|
}
|
|
5044
5299
|
/**
|
|
5045
|
-
*
|
|
5300
|
+
* structure holding multiple subsignatures.
|
|
5046
5301
|
* Definition:
|
|
5047
5302
|
* crypto/multisig.go : MultisigSig
|
|
5048
5303
|
*/
|