@secondlayer/stacks 3.3.1 → 4.1.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/README.md +4 -0
- package/dist/shared/stacks-1arrcd11.js +48 -0
- package/dist/shared/stacks-1arrcd11.js.map +10 -0
- package/dist/shared/{stacks-6bgh2c9h.js → stacks-27fmgajb.js} +11 -3
- package/dist/shared/{stacks-b221qkst.cjs.map → stacks-27fmgajb.js.map} +4 -3
- package/dist/shared/{stacks-jknrzd6v.js → stacks-2evvn48s.js} +2 -2
- package/dist/shared/stacks-9mqveyjv.cjs.map +2 -2
- package/dist/shared/{stacks-8e5atbps.cjs → stacks-9qcr921s.cjs} +49 -5
- package/dist/shared/stacks-9qcr921s.cjs.map +10 -0
- package/dist/shared/{stacks-r1m1r72q.js → stacks-bw8qvqd1.js} +49 -23
- package/dist/shared/stacks-bw8qvqd1.js.map +27 -0
- package/dist/shared/stacks-enpj9krt.cjs +38 -0
- package/dist/shared/stacks-enpj9krt.cjs.map +10 -0
- package/dist/shared/{stacks-s361pmzs.cjs → stacks-fb75yew8.js} +86 -2
- package/dist/shared/{stacks-9d2d0qjc.js.map → stacks-fb75yew8.js.map} +6 -4
- package/dist/shared/{stacks-rw2xbtdv.js → stacks-gxq2pbky.js} +2 -2
- package/dist/shared/{stacks-rw2xbtdv.js.map → stacks-gxq2pbky.js.map} +1 -1
- package/dist/shared/{stacks-jx146qf1.js → stacks-hnqt5rz4.js} +27 -377
- package/dist/shared/stacks-hnqt5rz4.js.map +13 -0
- package/dist/shared/{stacks-v1hzk599.js → stacks-jpt52csy.js} +8 -10
- package/dist/shared/stacks-jpt52csy.js.map +10 -0
- package/dist/shared/{stacks-b221qkst.cjs → stacks-nyaw1z2a.cjs} +7 -2
- package/dist/shared/{stacks-6bgh2c9h.js.map → stacks-nyaw1z2a.cjs.map} +4 -3
- package/dist/shared/{stacks-bm49tsh0.js → stacks-rpqtgpyj.js} +42 -9
- package/dist/shared/stacks-rpqtgpyj.js.map +10 -0
- package/dist/shared/{stacks-g2qnr5qn.cjs → stacks-rryme9bv.cjs} +11 -364
- package/dist/shared/stacks-rryme9bv.cjs.map +13 -0
- package/dist/shared/{stacks-byyex2zk.cjs → stacks-ta1gar0b.cjs} +7 -2
- package/dist/shared/{stacks-byyex2zk.cjs.map → stacks-ta1gar0b.cjs.map} +2 -2
- package/dist/shared/{stacks-9d2d0qjc.js → stacks-tdsp5gsb.cjs} +54 -23
- package/dist/shared/{stacks-s361pmzs.cjs.map → stacks-tdsp5gsb.cjs.map} +6 -4
- package/dist/shared/stacks-vea7nde7.cjs +731 -0
- package/dist/shared/stacks-vea7nde7.cjs.map +13 -0
- package/dist/shared/stacks-w23294am.js +760 -0
- package/dist/shared/stacks-w23294am.js.map +13 -0
- package/dist/shared/{stacks-fvnxj77s.cjs → stacks-y4f7fm03.cjs} +33 -13
- package/dist/shared/{stacks-fvnxj77s.cjs.map → stacks-y4f7fm03.cjs.map} +7 -6
- package/dist/src/accounts/index.d.cts +1 -1
- package/dist/src/accounts/index.d.ts +1 -1
- package/dist/src/actions/index.d.cts +15 -11
- package/dist/src/actions/index.d.ts +15 -11
- package/dist/src/actions/index.js +21 -25
- package/dist/src/actions/index.js.map +1 -1
- package/dist/src/bitcoin/index.d.cts +29 -29
- package/dist/src/bitcoin/index.d.ts +29 -29
- package/dist/src/bitcoin/index.js +5 -6
- package/dist/src/bitcoin/index.js.map +2 -2
- package/dist/src/bns/index.d.cts +1 -1
- package/dist/src/bns/index.d.ts +1 -1
- package/dist/src/bns/index.js +9 -10
- package/dist/src/bns/index.js.map +2 -2
- package/dist/src/clarity/index.d.cts +37 -1
- package/dist/src/clarity/index.d.ts +37 -1
- package/dist/src/clarity/index.js +14 -2
- package/dist/src/clarity/index.js.map +1 -1
- package/dist/src/index.cjs.map +2 -2
- package/dist/src/index.d.cts +18 -14
- package/dist/src/index.d.ts +18 -14
- package/dist/src/index.js +22 -27
- package/dist/src/index.js.map +3 -3
- package/dist/src/postconditions/index.d.cts +66 -3
- package/dist/src/postconditions/index.d.ts +66 -3
- package/dist/src/postconditions/index.js +13 -3
- package/dist/src/postconditions/index.js.map +1 -1
- package/dist/src/pox/index.d.cts +1 -1
- package/dist/src/pox/index.d.ts +1 -1
- package/dist/src/pox/index.js +7 -9
- package/dist/src/pox/index.js.map +2 -2
- package/dist/src/pox5/index.cjs +213 -14
- package/dist/src/pox5/index.cjs.map +8 -7
- package/dist/src/pox5/index.d.cts +88 -5
- package/dist/src/pox5/index.d.ts +88 -5
- package/dist/src/pox5/index.js +222 -21
- package/dist/src/pox5/index.js.map +8 -7
- package/dist/src/sbtc/index.d.cts +1 -1
- package/dist/src/sbtc/index.d.ts +1 -1
- package/dist/src/sbtc/index.js +6 -7
- package/dist/src/sbtc/index.js.map +2 -2
- package/dist/src/stackingdao/index.d.cts +1 -1
- package/dist/src/stackingdao/index.d.ts +1 -1
- package/dist/src/stackingdao/index.js +7 -9
- package/dist/src/stackingdao/index.js.map +2 -2
- package/dist/src/subscriptions/index.d.cts +1 -1
- package/dist/src/subscriptions/index.d.ts +1 -1
- package/dist/src/tools/index.cjs +494 -367
- package/dist/src/tools/index.cjs.map +11 -9
- package/dist/src/tools/index.d.cts +1 -1
- package/dist/src/tools/index.d.ts +1 -1
- package/dist/src/tools/index.js +494 -367
- package/dist/src/tools/index.js.map +11 -9
- package/dist/src/transactions/index.cjs +3 -1
- package/dist/src/transactions/index.cjs.map +1 -1
- package/dist/src/transactions/index.d.cts +16 -9
- package/dist/src/transactions/index.d.ts +16 -9
- package/dist/src/transactions/index.js +31 -27
- package/dist/src/transactions/index.js.map +1 -1
- package/package.json +2 -7
- package/dist/shared/stacks-1mpmzzyp.js +0 -85
- package/dist/shared/stacks-1mpmzzyp.js.map +0 -11
- package/dist/shared/stacks-44y18a8e.cjs +0 -28
- package/dist/shared/stacks-44y18a8e.cjs.map +0 -10
- package/dist/shared/stacks-8e5atbps.cjs.map +0 -10
- package/dist/shared/stacks-8khy9v27.cjs +0 -7
- package/dist/shared/stacks-8khy9v27.cjs.map +0 -10
- package/dist/shared/stacks-bm49tsh0.js.map +0 -10
- package/dist/shared/stacks-d6pgp4qk.cjs +0 -9
- package/dist/shared/stacks-d6pgp4qk.cjs.map +0 -9
- package/dist/shared/stacks-fh48neva.js +0 -13
- package/dist/shared/stacks-fh48neva.js.map +0 -10
- package/dist/shared/stacks-fjrpnkt3.cjs +0 -55
- package/dist/shared/stacks-fjrpnkt3.cjs.map +0 -11
- package/dist/shared/stacks-g2qnr5qn.cjs.map +0 -15
- package/dist/shared/stacks-gkf9tsws.js +0 -285
- package/dist/shared/stacks-gkf9tsws.js.map +0 -10
- package/dist/shared/stacks-jx146qf1.js.map +0 -15
- package/dist/shared/stacks-qjgh6pqr.cjs +0 -258
- package/dist/shared/stacks-qjgh6pqr.cjs.map +0 -10
- package/dist/shared/stacks-r1m1r72q.js.map +0 -26
- package/dist/shared/stacks-v1hzk599.js.map +0 -10
- package/dist/shared/stacks-w8tt1fmt.js +0 -44
- package/dist/shared/stacks-w8tt1fmt.js.map +0 -10
- package/dist/shared/stacks-z53fwfcm.js +0 -3
- package/dist/shared/stacks-z53fwfcm.js.map +0 -9
- package/dist/src/x402/index.cjs +0 -65
- package/dist/src/x402/index.cjs.map +0 -11
- package/dist/src/x402/index.d.cts +0 -501
- package/dist/src/x402/index.d.ts +0 -501
- package/dist/src/x402/index.js +0 -90
- package/dist/src/x402/index.js.map +0 -11
- /package/dist/shared/{stacks-jknrzd6v.js.map → stacks-2evvn48s.js.map} +0 -0
|
@@ -12,6 +12,7 @@ __export(exports_transactions, {
|
|
|
12
12
|
sigHashPostSign: () => sigHashPostSign,
|
|
13
13
|
serializeTransactionHex: () => serializeTransactionHex,
|
|
14
14
|
serializeTransaction: () => serializeTransaction,
|
|
15
|
+
serializePostConditionWire: () => serializePostConditionWire,
|
|
15
16
|
replayMultiSigSigHash: () => replayMultiSigSigHash,
|
|
16
17
|
nextSignature: () => nextSignature,
|
|
17
18
|
makeMultiSigAddress: () => makeMultiSigAddress,
|
|
@@ -20,6 +21,7 @@ __export(exports_transactions, {
|
|
|
20
21
|
getOriginSigHash: () => getOriginSigHash,
|
|
21
22
|
finalizeMultiSig: () => finalizeMultiSig,
|
|
22
23
|
deserializeTransaction: () => deserializeTransaction,
|
|
24
|
+
deserializePostConditionWire: () => deserializePostConditionWire,
|
|
23
25
|
createStandardAuth: () => createStandardAuth,
|
|
24
26
|
createSponsoredAuth: () => createSponsoredAuth,
|
|
25
27
|
createSingleSigSpendingCondition: () => createSingleSigSpendingCondition,
|
|
@@ -51,5 +53,5 @@ __export(exports_transactions, {
|
|
|
51
53
|
});
|
|
52
54
|
module.exports = __toCommonJS(exports_transactions);
|
|
53
55
|
|
|
54
|
-
//# debugId=
|
|
56
|
+
//# debugId=230ACFF33EBA8B8B64756E2164756E21
|
|
55
57
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -95,6 +95,7 @@ type AnchorMode = (typeof AnchorMode)[keyof typeof AnchorMode];
|
|
|
95
95
|
declare const PostConditionModeWire: {
|
|
96
96
|
readonly Allow: 0x01
|
|
97
97
|
readonly Deny: 0x02
|
|
98
|
+
readonly Originator: 0x03
|
|
98
99
|
};
|
|
99
100
|
type PostConditionModeWire = (typeof PostConditionModeWire)[keyof typeof PostConditionModeWire];
|
|
100
101
|
declare const AddressHashMode: {
|
|
@@ -121,6 +122,7 @@ declare const FungibleConditionCode: {
|
|
|
121
122
|
declare const NonFungibleConditionCode: {
|
|
122
123
|
readonly Sends: 0x10
|
|
123
124
|
readonly DoesNotSend: 0x11
|
|
125
|
+
readonly MaybeSent: 0x12
|
|
124
126
|
};
|
|
125
127
|
declare const PoxConditionCode: {
|
|
126
128
|
readonly WillNotPerform: 0x30
|
|
@@ -325,7 +327,7 @@ type LocalAccount = {
|
|
|
325
327
|
publicKey: string
|
|
326
328
|
/** Raw ECDSA sign over a hash */
|
|
327
329
|
sign(hash: Uint8Array): Uint8Array
|
|
328
|
-
/** Sign a
|
|
330
|
+
/** Sign a raw UTF-8 / byte message (`sha256(bytes)`). Not SIP-018. */
|
|
329
331
|
signMessage(message: string | Uint8Array): string
|
|
330
332
|
};
|
|
331
333
|
/** Account with a user-provided signing function (sync or async). */
|
|
@@ -392,7 +394,7 @@ type StacksChain = {
|
|
|
392
394
|
}
|
|
393
395
|
};
|
|
394
396
|
type FungibleComparator = "eq" | "gt" | "gte" | "lt" | "lte";
|
|
395
|
-
type NonFungibleComparator = "sent" | "not-sent";
|
|
397
|
+
type NonFungibleComparator = "sent" | "not-sent" | "maybe-sent";
|
|
396
398
|
type StxPostCondition = {
|
|
397
399
|
type: "stx-postcondition"
|
|
398
400
|
address: string
|
|
@@ -426,6 +428,9 @@ type PoxPostCondition = {
|
|
|
426
428
|
condition: PoxComparator
|
|
427
429
|
};
|
|
428
430
|
type PostCondition = StxPostCondition | FtPostCondition | NftPostCondition | StakingPostCondition | PoxPostCondition;
|
|
431
|
+
/** Serialized PC hex is accepted anywhere a `PostCondition` object is. */
|
|
432
|
+
type PostConditionInput = PostCondition | string;
|
|
433
|
+
type PostConditionMode = "allow" | "deny" | "originator";
|
|
429
434
|
type IntegerType = number | string | bigint | Uint8Array;
|
|
430
435
|
type MultiSigOptions = {
|
|
431
436
|
publicKeys?: string[]
|
|
@@ -440,8 +445,8 @@ type BuildTokenTransferOptions = MultiSigOptions & {
|
|
|
440
445
|
nonce: IntegerType
|
|
441
446
|
publicKey?: string
|
|
442
447
|
chain?: StacksChain
|
|
443
|
-
postConditionMode?:
|
|
444
|
-
postConditions?:
|
|
448
|
+
postConditionMode?: PostConditionMode
|
|
449
|
+
postConditions?: PostConditionInput[]
|
|
445
450
|
sponsored?: boolean
|
|
446
451
|
};
|
|
447
452
|
type BuildContractCallOptions = MultiSigOptions & {
|
|
@@ -453,8 +458,8 @@ type BuildContractCallOptions = MultiSigOptions & {
|
|
|
453
458
|
nonce: IntegerType
|
|
454
459
|
publicKey?: string
|
|
455
460
|
chain?: StacksChain
|
|
456
|
-
postConditionMode?:
|
|
457
|
-
postConditions?:
|
|
461
|
+
postConditionMode?: PostConditionMode
|
|
462
|
+
postConditions?: PostConditionInput[]
|
|
458
463
|
sponsored?: boolean
|
|
459
464
|
};
|
|
460
465
|
type BuildContractDeployOptions = MultiSigOptions & {
|
|
@@ -465,15 +470,17 @@ type BuildContractDeployOptions = MultiSigOptions & {
|
|
|
465
470
|
nonce: IntegerType
|
|
466
471
|
publicKey?: string
|
|
467
472
|
chain?: StacksChain
|
|
468
|
-
postConditionMode?:
|
|
469
|
-
postConditions?:
|
|
473
|
+
postConditionMode?: PostConditionMode
|
|
474
|
+
postConditions?: PostConditionInput[]
|
|
470
475
|
sponsored?: boolean
|
|
471
476
|
};
|
|
472
477
|
declare function buildTokenTransfer(options: BuildTokenTransferOptions): StacksTransaction;
|
|
473
478
|
declare function buildContractCall(options: BuildContractCallOptions): StacksTransaction;
|
|
474
479
|
declare function buildContractDeploy(options: BuildContractDeployOptions): StacksTransaction;
|
|
480
|
+
declare function serializePostConditionWire(pc: PostConditionWire): Uint8Array;
|
|
475
481
|
declare function serializeTransaction(tx: StacksTransaction): Uint8Array;
|
|
476
482
|
declare function serializeTransactionHex(tx: StacksTransaction): string;
|
|
483
|
+
declare function deserializePostConditionWire(input: string | Uint8Array): PostConditionWire;
|
|
477
484
|
declare function deserializeTransaction(input: string | Uint8Array, meta?: {
|
|
478
485
|
_multisig?: {
|
|
479
486
|
publicKeys: string[]
|
|
@@ -495,4 +502,4 @@ declare function signMultiSigWithAccount(tx: StacksTransaction, account: LocalAc
|
|
|
495
502
|
declare function finalizeMultiSig(tx: StacksTransaction, publicKeys: string[]): StacksTransaction;
|
|
496
503
|
/** Combine independently-signed non-sequential multi-sig transactions */
|
|
497
504
|
declare function combineMultiSigSignatures(baseTx: StacksTransaction, signedTxs: StacksTransaction[]): StacksTransaction;
|
|
498
|
-
export { signTransactionWithAccount, signTransaction, signSponsorWithAccount, signSponsor, signMultiSigWithAccount, signMultiSig, signBegin, sigHashPreSign, sigHashPostSign, serializeTransactionHex, serializeTransaction, replayMultiSigSigHash, nextSignature, makeMultiSigAddress, isNonSequential, getTransactionId, getOriginSigHash, finalizeMultiSig, deserializeTransaction, createStandardAuth, createSponsoredAuth, createSingleSigSpendingCondition, createMultiSigSpendingCondition, combineMultiSigSignatures, buildTokenTransfer, buildContractDeploy, buildContractCall, VRF_PROOF_BYTES_LENGTH, TransactionPayload, TransactionAuthField, TokenTransferPayload, TenureChangePayload, TenureChangeCause as TenureChangeCauseType, TenureChangeCause, StxPostConditionWire, StandardAuthorization, StakingPostConditionWire, StacksTransaction, SponsoredAuthorization, SpendingCondition, SmartContractPayload, SingleSigSpendingCondition, RECOVERABLE_ECDSA_SIG_LENGTH_BYTES, PubKeyEncoding, PoxPostConditionWire, PoxConditionCode, PostConditionWire, PostConditionPrincipalId, PostConditionModeWire, PoisonMicroblockPayload, PayloadType, NonFungibleConditionCode, NftPostConditionWire, NakamotoCoinbasePayload, MultiSigSpendingCondition, MultiSigHashMode, MICROBLOCK_HEADER_BYTES_LENGTH, MEMO_MAX_LENGTH_BYTES, MAX_STRING_LENGTH_BYTES, FungibleConditionCode, FtPostConditionWire, ContractCallPayload, CoinbaseToAltRecipientPayload, CoinbasePayload, ClarityVersion, COINBASE_BYTES_LENGTH, BuildTokenTransferOptions, BuildContractDeployOptions, BuildContractCallOptions, Authorization, AuthType, AuthFieldType, AssetType, AnchorMode, AddressHashMode };
|
|
505
|
+
export { signTransactionWithAccount, signTransaction, signSponsorWithAccount, signSponsor, signMultiSigWithAccount, signMultiSig, signBegin, sigHashPreSign, sigHashPostSign, serializeTransactionHex, serializeTransaction, serializePostConditionWire, replayMultiSigSigHash, nextSignature, makeMultiSigAddress, isNonSequential, getTransactionId, getOriginSigHash, finalizeMultiSig, deserializeTransaction, deserializePostConditionWire, createStandardAuth, createSponsoredAuth, createSingleSigSpendingCondition, createMultiSigSpendingCondition, combineMultiSigSignatures, buildTokenTransfer, buildContractDeploy, buildContractCall, VRF_PROOF_BYTES_LENGTH, TransactionPayload, TransactionAuthField, TokenTransferPayload, TenureChangePayload, TenureChangeCause as TenureChangeCauseType, TenureChangeCause, StxPostConditionWire, StandardAuthorization, StakingPostConditionWire, StacksTransaction, SponsoredAuthorization, SpendingCondition, SmartContractPayload, SingleSigSpendingCondition, RECOVERABLE_ECDSA_SIG_LENGTH_BYTES, PubKeyEncoding, PoxPostConditionWire, PoxConditionCode, PostConditionWire, PostConditionPrincipalId, PostConditionModeWire, PoisonMicroblockPayload, PayloadType, NonFungibleConditionCode, NftPostConditionWire, NakamotoCoinbasePayload, MultiSigSpendingCondition, MultiSigHashMode, MICROBLOCK_HEADER_BYTES_LENGTH, MEMO_MAX_LENGTH_BYTES, MAX_STRING_LENGTH_BYTES, FungibleConditionCode, FtPostConditionWire, ContractCallPayload, CoinbaseToAltRecipientPayload, CoinbasePayload, ClarityVersion, COINBASE_BYTES_LENGTH, BuildTokenTransferOptions, BuildContractDeployOptions, BuildContractCallOptions, Authorization, AuthType, AuthFieldType, AssetType, AnchorMode, AddressHashMode };
|
|
@@ -95,6 +95,7 @@ type AnchorMode = (typeof AnchorMode)[keyof typeof AnchorMode];
|
|
|
95
95
|
declare const PostConditionModeWire: {
|
|
96
96
|
readonly Allow: 0x01
|
|
97
97
|
readonly Deny: 0x02
|
|
98
|
+
readonly Originator: 0x03
|
|
98
99
|
};
|
|
99
100
|
type PostConditionModeWire = (typeof PostConditionModeWire)[keyof typeof PostConditionModeWire];
|
|
100
101
|
declare const AddressHashMode: {
|
|
@@ -121,6 +122,7 @@ declare const FungibleConditionCode: {
|
|
|
121
122
|
declare const NonFungibleConditionCode: {
|
|
122
123
|
readonly Sends: 0x10
|
|
123
124
|
readonly DoesNotSend: 0x11
|
|
125
|
+
readonly MaybeSent: 0x12
|
|
124
126
|
};
|
|
125
127
|
declare const PoxConditionCode: {
|
|
126
128
|
readonly WillNotPerform: 0x30
|
|
@@ -325,7 +327,7 @@ type LocalAccount = {
|
|
|
325
327
|
publicKey: string
|
|
326
328
|
/** Raw ECDSA sign over a hash */
|
|
327
329
|
sign(hash: Uint8Array): Uint8Array
|
|
328
|
-
/** Sign a
|
|
330
|
+
/** Sign a raw UTF-8 / byte message (`sha256(bytes)`). Not SIP-018. */
|
|
329
331
|
signMessage(message: string | Uint8Array): string
|
|
330
332
|
};
|
|
331
333
|
/** Account with a user-provided signing function (sync or async). */
|
|
@@ -392,7 +394,7 @@ type StacksChain = {
|
|
|
392
394
|
}
|
|
393
395
|
};
|
|
394
396
|
type FungibleComparator = "eq" | "gt" | "gte" | "lt" | "lte";
|
|
395
|
-
type NonFungibleComparator = "sent" | "not-sent";
|
|
397
|
+
type NonFungibleComparator = "sent" | "not-sent" | "maybe-sent";
|
|
396
398
|
type StxPostCondition = {
|
|
397
399
|
type: "stx-postcondition"
|
|
398
400
|
address: string
|
|
@@ -426,6 +428,9 @@ type PoxPostCondition = {
|
|
|
426
428
|
condition: PoxComparator
|
|
427
429
|
};
|
|
428
430
|
type PostCondition = StxPostCondition | FtPostCondition | NftPostCondition | StakingPostCondition | PoxPostCondition;
|
|
431
|
+
/** Serialized PC hex is accepted anywhere a `PostCondition` object is. */
|
|
432
|
+
type PostConditionInput = PostCondition | string;
|
|
433
|
+
type PostConditionMode = "allow" | "deny" | "originator";
|
|
429
434
|
type IntegerType = number | string | bigint | Uint8Array;
|
|
430
435
|
type MultiSigOptions = {
|
|
431
436
|
publicKeys?: string[]
|
|
@@ -440,8 +445,8 @@ type BuildTokenTransferOptions = MultiSigOptions & {
|
|
|
440
445
|
nonce: IntegerType
|
|
441
446
|
publicKey?: string
|
|
442
447
|
chain?: StacksChain
|
|
443
|
-
postConditionMode?:
|
|
444
|
-
postConditions?:
|
|
448
|
+
postConditionMode?: PostConditionMode
|
|
449
|
+
postConditions?: PostConditionInput[]
|
|
445
450
|
sponsored?: boolean
|
|
446
451
|
};
|
|
447
452
|
type BuildContractCallOptions = MultiSigOptions & {
|
|
@@ -453,8 +458,8 @@ type BuildContractCallOptions = MultiSigOptions & {
|
|
|
453
458
|
nonce: IntegerType
|
|
454
459
|
publicKey?: string
|
|
455
460
|
chain?: StacksChain
|
|
456
|
-
postConditionMode?:
|
|
457
|
-
postConditions?:
|
|
461
|
+
postConditionMode?: PostConditionMode
|
|
462
|
+
postConditions?: PostConditionInput[]
|
|
458
463
|
sponsored?: boolean
|
|
459
464
|
};
|
|
460
465
|
type BuildContractDeployOptions = MultiSigOptions & {
|
|
@@ -465,15 +470,17 @@ type BuildContractDeployOptions = MultiSigOptions & {
|
|
|
465
470
|
nonce: IntegerType
|
|
466
471
|
publicKey?: string
|
|
467
472
|
chain?: StacksChain
|
|
468
|
-
postConditionMode?:
|
|
469
|
-
postConditions?:
|
|
473
|
+
postConditionMode?: PostConditionMode
|
|
474
|
+
postConditions?: PostConditionInput[]
|
|
470
475
|
sponsored?: boolean
|
|
471
476
|
};
|
|
472
477
|
declare function buildTokenTransfer(options: BuildTokenTransferOptions): StacksTransaction;
|
|
473
478
|
declare function buildContractCall(options: BuildContractCallOptions): StacksTransaction;
|
|
474
479
|
declare function buildContractDeploy(options: BuildContractDeployOptions): StacksTransaction;
|
|
480
|
+
declare function serializePostConditionWire(pc: PostConditionWire): Uint8Array;
|
|
475
481
|
declare function serializeTransaction(tx: StacksTransaction): Uint8Array;
|
|
476
482
|
declare function serializeTransactionHex(tx: StacksTransaction): string;
|
|
483
|
+
declare function deserializePostConditionWire(input: string | Uint8Array): PostConditionWire;
|
|
477
484
|
declare function deserializeTransaction(input: string | Uint8Array, meta?: {
|
|
478
485
|
_multisig?: {
|
|
479
486
|
publicKeys: string[]
|
|
@@ -495,4 +502,4 @@ declare function signMultiSigWithAccount(tx: StacksTransaction, account: LocalAc
|
|
|
495
502
|
declare function finalizeMultiSig(tx: StacksTransaction, publicKeys: string[]): StacksTransaction;
|
|
496
503
|
/** Combine independently-signed non-sequential multi-sig transactions */
|
|
497
504
|
declare function combineMultiSigSignatures(baseTx: StacksTransaction, signedTxs: StacksTransaction[]): StacksTransaction;
|
|
498
|
-
export { signTransactionWithAccount, signTransaction, signSponsorWithAccount, signSponsor, signMultiSigWithAccount, signMultiSig, signBegin, sigHashPreSign, sigHashPostSign, serializeTransactionHex, serializeTransaction, replayMultiSigSigHash, nextSignature, makeMultiSigAddress, isNonSequential, getTransactionId, getOriginSigHash, finalizeMultiSig, deserializeTransaction, createStandardAuth, createSponsoredAuth, createSingleSigSpendingCondition, createMultiSigSpendingCondition, combineMultiSigSignatures, buildTokenTransfer, buildContractDeploy, buildContractCall, VRF_PROOF_BYTES_LENGTH, TransactionPayload, TransactionAuthField, TokenTransferPayload, TenureChangePayload, TenureChangeCause as TenureChangeCauseType, TenureChangeCause, StxPostConditionWire, StandardAuthorization, StakingPostConditionWire, StacksTransaction, SponsoredAuthorization, SpendingCondition, SmartContractPayload, SingleSigSpendingCondition, RECOVERABLE_ECDSA_SIG_LENGTH_BYTES, PubKeyEncoding, PoxPostConditionWire, PoxConditionCode, PostConditionWire, PostConditionPrincipalId, PostConditionModeWire, PoisonMicroblockPayload, PayloadType, NonFungibleConditionCode, NftPostConditionWire, NakamotoCoinbasePayload, MultiSigSpendingCondition, MultiSigHashMode, MICROBLOCK_HEADER_BYTES_LENGTH, MEMO_MAX_LENGTH_BYTES, MAX_STRING_LENGTH_BYTES, FungibleConditionCode, FtPostConditionWire, ContractCallPayload, CoinbaseToAltRecipientPayload, CoinbasePayload, ClarityVersion, COINBASE_BYTES_LENGTH, BuildTokenTransferOptions, BuildContractDeployOptions, BuildContractCallOptions, Authorization, AuthType, AuthFieldType, AssetType, AnchorMode, AddressHashMode };
|
|
505
|
+
export { signTransactionWithAccount, signTransaction, signSponsorWithAccount, signSponsor, signMultiSigWithAccount, signMultiSig, signBegin, sigHashPreSign, sigHashPostSign, serializeTransactionHex, serializeTransaction, serializePostConditionWire, replayMultiSigSigHash, nextSignature, makeMultiSigAddress, isNonSequential, getTransactionId, getOriginSigHash, finalizeMultiSig, deserializeTransaction, deserializePostConditionWire, createStandardAuth, createSponsoredAuth, createSingleSigSpendingCondition, createMultiSigSpendingCondition, combineMultiSigSignatures, buildTokenTransfer, buildContractDeploy, buildContractCall, VRF_PROOF_BYTES_LENGTH, TransactionPayload, TransactionAuthField, TokenTransferPayload, TenureChangePayload, TenureChangeCause as TenureChangeCauseType, TenureChangeCause, StxPostConditionWire, StandardAuthorization, StakingPostConditionWire, StacksTransaction, SponsoredAuthorization, SpendingCondition, SmartContractPayload, SingleSigSpendingCondition, RECOVERABLE_ECDSA_SIG_LENGTH_BYTES, PubKeyEncoding, PoxPostConditionWire, PoxConditionCode, PostConditionWire, PostConditionPrincipalId, PostConditionModeWire, PoisonMicroblockPayload, PayloadType, NonFungibleConditionCode, NftPostConditionWire, NakamotoCoinbasePayload, MultiSigSpendingCondition, MultiSigHashMode, MICROBLOCK_HEADER_BYTES_LENGTH, MEMO_MAX_LENGTH_BYTES, MAX_STRING_LENGTH_BYTES, FungibleConditionCode, FtPostConditionWire, ContractCallPayload, CoinbaseToAltRecipientPayload, CoinbasePayload, ClarityVersion, COINBASE_BYTES_LENGTH, BuildTokenTransferOptions, BuildContractDeployOptions, BuildContractCallOptions, Authorization, AuthType, AuthFieldType, AssetType, AnchorMode, AddressHashMode };
|
|
@@ -1,27 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
deserializeTransaction
|
|
3
|
-
} from "../../shared/stacks-gkf9tsws.js";
|
|
4
|
-
import {
|
|
5
|
-
AddressHashMode,
|
|
6
|
-
AnchorMode,
|
|
7
|
-
AssetType,
|
|
8
|
-
AuthFieldType,
|
|
9
|
-
AuthType,
|
|
10
|
-
COINBASE_BYTES_LENGTH,
|
|
11
|
-
ClarityVersion,
|
|
12
|
-
FungibleConditionCode,
|
|
13
|
-
MAX_STRING_LENGTH_BYTES,
|
|
14
|
-
MEMO_MAX_LENGTH_BYTES,
|
|
15
|
-
MICROBLOCK_HEADER_BYTES_LENGTH,
|
|
16
|
-
NonFungibleConditionCode,
|
|
17
|
-
PayloadType,
|
|
18
|
-
PostConditionModeWire,
|
|
19
|
-
PostConditionPrincipalId,
|
|
20
|
-
PoxConditionCode,
|
|
21
|
-
PubKeyEncoding,
|
|
22
|
-
RECOVERABLE_ECDSA_SIG_LENGTH_BYTES,
|
|
23
|
-
TenureChangeCause,
|
|
24
|
-
VRF_PROOF_BYTES_LENGTH,
|
|
25
2
|
buildContractCall,
|
|
26
3
|
buildContractDeploy,
|
|
27
4
|
buildTokenTransfer,
|
|
@@ -37,8 +14,6 @@ import {
|
|
|
37
14
|
makeMultiSigAddress,
|
|
38
15
|
nextSignature,
|
|
39
16
|
replayMultiSigSigHash,
|
|
40
|
-
serializeTransaction,
|
|
41
|
-
serializeTransactionHex,
|
|
42
17
|
sigHashPostSign,
|
|
43
18
|
sigHashPreSign,
|
|
44
19
|
signBegin,
|
|
@@ -48,7 +23,34 @@ import {
|
|
|
48
23
|
signSponsorWithAccount,
|
|
49
24
|
signTransaction,
|
|
50
25
|
signTransactionWithAccount
|
|
51
|
-
} from "../../shared/stacks-
|
|
26
|
+
} from "../../shared/stacks-hnqt5rz4.js";
|
|
27
|
+
import {
|
|
28
|
+
AddressHashMode,
|
|
29
|
+
AnchorMode,
|
|
30
|
+
AssetType,
|
|
31
|
+
AuthFieldType,
|
|
32
|
+
AuthType,
|
|
33
|
+
COINBASE_BYTES_LENGTH,
|
|
34
|
+
ClarityVersion,
|
|
35
|
+
FungibleConditionCode,
|
|
36
|
+
MAX_STRING_LENGTH_BYTES,
|
|
37
|
+
MEMO_MAX_LENGTH_BYTES,
|
|
38
|
+
MICROBLOCK_HEADER_BYTES_LENGTH,
|
|
39
|
+
NonFungibleConditionCode,
|
|
40
|
+
PayloadType,
|
|
41
|
+
PostConditionModeWire,
|
|
42
|
+
PostConditionPrincipalId,
|
|
43
|
+
PoxConditionCode,
|
|
44
|
+
PubKeyEncoding,
|
|
45
|
+
RECOVERABLE_ECDSA_SIG_LENGTH_BYTES,
|
|
46
|
+
TenureChangeCause,
|
|
47
|
+
VRF_PROOF_BYTES_LENGTH,
|
|
48
|
+
deserializePostConditionWire,
|
|
49
|
+
deserializeTransaction,
|
|
50
|
+
serializePostConditionWire,
|
|
51
|
+
serializeTransaction,
|
|
52
|
+
serializeTransactionHex
|
|
53
|
+
} from "../../shared/stacks-w23294am.js";
|
|
52
54
|
import"../../shared/stacks-ttdk2g2f.js";
|
|
53
55
|
import"../../shared/stacks-bfan7ex7.js";
|
|
54
56
|
import"../../shared/stacks-qs5fzts5.js";
|
|
@@ -64,6 +66,7 @@ export {
|
|
|
64
66
|
sigHashPostSign,
|
|
65
67
|
serializeTransactionHex,
|
|
66
68
|
serializeTransaction,
|
|
69
|
+
serializePostConditionWire,
|
|
67
70
|
replayMultiSigSigHash,
|
|
68
71
|
nextSignature,
|
|
69
72
|
makeMultiSigAddress,
|
|
@@ -72,6 +75,7 @@ export {
|
|
|
72
75
|
getOriginSigHash,
|
|
73
76
|
finalizeMultiSig,
|
|
74
77
|
deserializeTransaction,
|
|
78
|
+
deserializePostConditionWire,
|
|
75
79
|
createStandardAuth,
|
|
76
80
|
createSponsoredAuth,
|
|
77
81
|
createSingleSigSpendingCondition,
|
|
@@ -102,5 +106,5 @@ export {
|
|
|
102
106
|
AddressHashMode
|
|
103
107
|
};
|
|
104
108
|
|
|
105
|
-
//# debugId=
|
|
109
|
+
//# debugId=61F01E35BB39953064756E2164756E21
|
|
106
110
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@secondlayer/stacks",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.1.0",
|
|
4
|
+
"description": "Typed Stacks client for TypeScript — read contracts, decode Clarity, build and send transactions.",
|
|
4
5
|
"license": "MIT",
|
|
5
6
|
"repository": {
|
|
6
7
|
"type": "git",
|
|
@@ -8,7 +9,6 @@
|
|
|
8
9
|
"directory": "packages/stacks"
|
|
9
10
|
},
|
|
10
11
|
"homepage": "https://github.com/ryanwaits/secondlayer/tree/main/packages/stacks#readme",
|
|
11
|
-
"description": "A viem-style SDK for the Stacks blockchain",
|
|
12
12
|
"type": "module",
|
|
13
13
|
"main": "./dist/src/index.cjs",
|
|
14
14
|
"module": "./dist/src/index.js",
|
|
@@ -109,11 +109,6 @@
|
|
|
109
109
|
"import": "./dist/src/tools/btc/index.js",
|
|
110
110
|
"require": "./dist/src/tools/btc/index.cjs"
|
|
111
111
|
},
|
|
112
|
-
"./x402": {
|
|
113
|
-
"types": "./dist/src/x402/index.d.ts",
|
|
114
|
-
"import": "./dist/src/x402/index.js",
|
|
115
|
-
"require": "./dist/src/x402/index.cjs"
|
|
116
|
-
},
|
|
117
112
|
"./filters": {
|
|
118
113
|
"types": "./dist/src/filters/index.d.ts",
|
|
119
114
|
"import": "./dist/src/filters/index.js",
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
assertNoFeeTierForProvider,
|
|
3
|
-
broadcastWithNonceReset,
|
|
4
|
-
isFeeTier,
|
|
5
|
-
isProviderAccount,
|
|
6
|
-
resolveFee,
|
|
7
|
-
resolveNonce,
|
|
8
|
-
setUnsignedFee
|
|
9
|
-
} from "./stacks-9d2d0qjc.js";
|
|
10
|
-
import {
|
|
11
|
-
MalformedResponseError
|
|
12
|
-
} from "./stacks-fh48neva.js";
|
|
13
|
-
import {
|
|
14
|
-
buildContractCall,
|
|
15
|
-
signTransactionWithAccount
|
|
16
|
-
} from "./stacks-jx146qf1.js";
|
|
17
|
-
import {
|
|
18
|
-
deserializeCVBytes,
|
|
19
|
-
serializeCVBytes
|
|
20
|
-
} from "./stacks-ttdk2g2f.js";
|
|
21
|
-
import {
|
|
22
|
-
parseContractId
|
|
23
|
-
} from "./stacks-bfan7ex7.js";
|
|
24
|
-
import {
|
|
25
|
-
bytesToHex,
|
|
26
|
-
with0x
|
|
27
|
-
} from "./stacks-qs5fzts5.js";
|
|
28
|
-
|
|
29
|
-
// src/actions/public/getMapEntry.ts
|
|
30
|
-
async function getMapEntry(client, params) {
|
|
31
|
-
const [address, name] = parseContractId(params.contract);
|
|
32
|
-
const serializedKey = with0x(bytesToHex(serializeCVBytes(params.key)));
|
|
33
|
-
const data = await client.request(`/v2/map_entry/${address}/${name}/${params.mapName}`, {
|
|
34
|
-
method: "POST",
|
|
35
|
-
body: serializedKey
|
|
36
|
-
});
|
|
37
|
-
if (typeof data?.data !== "string") {
|
|
38
|
-
throw new MalformedResponseError(`getMapEntry: /v2/map_entry/${address}/${name}/${params.mapName} response is missing "data"`);
|
|
39
|
-
}
|
|
40
|
-
return deserializeCVBytes(data.data);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// src/actions/wallet/callContract.ts
|
|
44
|
-
async function callContract(client, params) {
|
|
45
|
-
const account = client.account;
|
|
46
|
-
if (!account)
|
|
47
|
-
throw new Error("Account required");
|
|
48
|
-
const [contractAddress, contractName] = parseContractId(params.contract);
|
|
49
|
-
if (isProviderAccount(account)) {
|
|
50
|
-
assertNoFeeTierForProvider(params.fee);
|
|
51
|
-
const result = await account.provider.request("stx_callContract", {
|
|
52
|
-
contract: params.contract,
|
|
53
|
-
functionName: params.functionName,
|
|
54
|
-
functionArgs: params.functionArgs ?? []
|
|
55
|
-
});
|
|
56
|
-
return result.txid;
|
|
57
|
-
}
|
|
58
|
-
const nonce = params.nonce ?? await resolveNonce(client, account.address);
|
|
59
|
-
const needsFeeResolution = params.fee === undefined || isFeeTier(params.fee);
|
|
60
|
-
const unsigned = buildContractCall({
|
|
61
|
-
contractAddress,
|
|
62
|
-
contractName,
|
|
63
|
-
functionName: params.functionName,
|
|
64
|
-
functionArgs: params.functionArgs ?? [],
|
|
65
|
-
fee: needsFeeResolution ? 0n : params.fee,
|
|
66
|
-
nonce,
|
|
67
|
-
publicKey: account.publicKey,
|
|
68
|
-
chain: client.chain,
|
|
69
|
-
postConditionMode: params.postConditionMode,
|
|
70
|
-
postConditions: params.postConditions
|
|
71
|
-
});
|
|
72
|
-
if (needsFeeResolution) {
|
|
73
|
-
setUnsignedFee(unsigned, await resolveFee(client, unsigned, params.fee));
|
|
74
|
-
}
|
|
75
|
-
const signed = await signTransactionWithAccount(unsigned, account);
|
|
76
|
-
return broadcastWithNonceReset(client, {
|
|
77
|
-
transaction: signed,
|
|
78
|
-
address: account.address
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export { getMapEntry, callContract };
|
|
83
|
-
|
|
84
|
-
//# debugId=FF3F274BBCF0781464756E2164756E21
|
|
85
|
-
//# sourceMappingURL=stacks-1mpmzzyp.js.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/actions/public/getMapEntry.ts", "../src/actions/wallet/callContract.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { deserializeCVBytes } from \"../../clarity/deserialize.ts\";\nimport { serializeCVBytes } from \"../../clarity/serialize.ts\";\nimport type { ClarityValue } from \"../../clarity/types.ts\";\nimport type { Client } from \"../../clients/types.ts\";\nimport { MalformedResponseError } from \"../../errors/response.ts\";\nimport { parseContractId } from \"../../utils/address.ts\";\nimport { bytesToHex, with0x } from \"../../utils/encoding.ts\";\n\nexport type GetMapEntryParams = {\n\tcontract: string; // \"address.name\"\n\tmapName: string;\n\tkey: ClarityValue;\n};\n\nexport async function getMapEntry<T extends ClarityValue = ClarityValue>(\n\tclient: Client,\n\tparams: GetMapEntryParams,\n): Promise<T> {\n\tconst [address, name] = parseContractId(params.contract);\n\tconst serializedKey = with0x(bytesToHex(serializeCVBytes(params.key)));\n\n\tconst data = await client.request(\n\t\t`/v2/map_entry/${address}/${name}/${params.mapName}`,\n\t\t{\n\t\t\tmethod: \"POST\",\n\t\t\tbody: serializedKey,\n\t\t},\n\t);\n\n\tif (typeof data?.data !== \"string\") {\n\t\tthrow new MalformedResponseError(\n\t\t\t`getMapEntry: /v2/map_entry/${address}/${name}/${params.mapName} response is missing \"data\"`,\n\t\t);\n\t}\n\treturn deserializeCVBytes<T>(data.data);\n}\n",
|
|
6
|
-
"import type { ClarityValue } from \"../../clarity/types.ts\";\nimport type { Client } from \"../../clients/types.ts\";\nimport type { PostCondition } from \"../../postconditions/types.ts\";\nimport { buildContractCall } from \"../../transactions/build.ts\";\nimport { signTransactionWithAccount } from \"../../transactions/signer.ts\";\nimport { parseContractId } from \"../../utils/address.ts\";\nimport type { IntegerType } from \"../../utils/encoding.ts\";\nimport { broadcastWithNonceReset, resolveNonce } from \"./nonceManager.ts\";\nimport {\n\ttype FeeParam,\n\tassertNoFeeTierForProvider,\n\tisFeeTier,\n\tisProviderAccount,\n\tresolveFee,\n\tsetUnsignedFee,\n} from \"./utils.ts\";\n\nexport type CallContractParams = {\n\tcontract: string; // \"address.name\"\n\tfunctionName: string;\n\tfunctionArgs?: ClarityValue[];\n\tfee?: FeeParam;\n\tnonce?: IntegerType;\n\tpostConditionMode?: \"allow\" | \"deny\";\n\tpostConditions?: PostCondition[];\n};\n\n/** Build, sign, and broadcast a contract call */\nexport async function callContract(\n\tclient: Client,\n\tparams: CallContractParams,\n): Promise<string> {\n\tconst account = client.account;\n\tif (!account) throw new Error(\"Account required\");\n\n\t// Validate the contract id up front so both the provider and local paths\n\t// reject malformed input instead of forwarding it to the wallet.\n\tconst [contractAddress, contractName] = parseContractId(params.contract);\n\n\t// Provider: delegate to wallet\n\tif (isProviderAccount(account)) {\n\t\tassertNoFeeTierForProvider(params.fee);\n\t\tconst result = await account.provider.request(\"stx_callContract\", {\n\t\t\tcontract: params.contract,\n\t\t\tfunctionName: params.functionName,\n\t\t\tfunctionArgs: params.functionArgs ?? [],\n\t\t});\n\t\treturn result.txid;\n\t}\n\n\t// Local/Custom: build → sign → broadcast\n\tconst nonce = params.nonce ?? (await resolveNonce(client, account.address));\n\n\tconst needsFeeResolution = params.fee === undefined || isFeeTier(params.fee);\n\n\tconst unsigned = buildContractCall({\n\t\tcontractAddress,\n\t\tcontractName,\n\t\tfunctionName: params.functionName,\n\t\tfunctionArgs: params.functionArgs ?? [],\n\t\tfee: needsFeeResolution ? 0n : (params.fee as IntegerType),\n\t\tnonce,\n\t\tpublicKey: account.publicKey,\n\t\tchain: client.chain,\n\t\tpostConditionMode: params.postConditionMode,\n\t\tpostConditions: params.postConditions,\n\t});\n\n\tif (needsFeeResolution) {\n\t\tsetUnsignedFee(unsigned, await resolveFee(client, unsigned, params.fee));\n\t}\n\n\tconst signed = await signTransactionWithAccount(unsigned, account);\n\treturn broadcastWithNonceReset(client, {\n\t\ttransaction: signed,\n\t\taddress: account.address,\n\t});\n}\n"
|
|
7
|
-
],
|
|
8
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,eAAsB,WAAkD,CACvE,QACA,QACa;AAAA,EACb,OAAO,SAAS,QAAQ,gBAAgB,OAAO,QAAQ;AAAA,EACvD,MAAM,gBAAgB,OAAO,WAAW,iBAAiB,OAAO,GAAG,CAAC,CAAC;AAAA,EAErE,MAAM,OAAO,MAAM,OAAO,QACzB,iBAAiB,WAAW,QAAQ,OAAO,WAC3C;AAAA,IACC,QAAQ;AAAA,IACR,MAAM;AAAA,EACP,CACD;AAAA,EAEA,IAAI,OAAO,MAAM,SAAS,UAAU;AAAA,IACnC,MAAM,IAAI,uBACT,8BAA8B,WAAW,QAAQ,OAAO,oCACzD;AAAA,EACD;AAAA,EACA,OAAO,mBAAsB,KAAK,IAAI;AAAA;;;ACNvC,eAAsB,YAAY,CACjC,QACA,QACkB;AAAA,EAClB,MAAM,UAAU,OAAO;AAAA,EACvB,IAAI,CAAC;AAAA,IAAS,MAAM,IAAI,MAAM,kBAAkB;AAAA,EAIhD,OAAO,iBAAiB,gBAAgB,gBAAgB,OAAO,QAAQ;AAAA,EAGvE,IAAI,kBAAkB,OAAO,GAAG;AAAA,IAC/B,2BAA2B,OAAO,GAAG;AAAA,IACrC,MAAM,SAAS,MAAM,QAAQ,SAAS,QAAQ,oBAAoB;AAAA,MACjE,UAAU,OAAO;AAAA,MACjB,cAAc,OAAO;AAAA,MACrB,cAAc,OAAO,gBAAgB,CAAC;AAAA,IACvC,CAAC;AAAA,IACD,OAAO,OAAO;AAAA,EACf;AAAA,EAGA,MAAM,QAAQ,OAAO,SAAU,MAAM,aAAa,QAAQ,QAAQ,OAAO;AAAA,EAEzE,MAAM,qBAAqB,OAAO,QAAQ,aAAa,UAAU,OAAO,GAAG;AAAA,EAE3E,MAAM,WAAW,kBAAkB;AAAA,IAClC;AAAA,IACA;AAAA,IACA,cAAc,OAAO;AAAA,IACrB,cAAc,OAAO,gBAAgB,CAAC;AAAA,IACtC,KAAK,qBAAqB,KAAM,OAAO;AAAA,IACvC;AAAA,IACA,WAAW,QAAQ;AAAA,IACnB,OAAO,OAAO;AAAA,IACd,mBAAmB,OAAO;AAAA,IAC1B,gBAAgB,OAAO;AAAA,EACxB,CAAC;AAAA,EAED,IAAI,oBAAoB;AAAA,IACvB,eAAe,UAAU,MAAM,WAAW,QAAQ,UAAU,OAAO,GAAG,CAAC;AAAA,EACxE;AAAA,EAEA,MAAM,SAAS,MAAM,2BAA2B,UAAU,OAAO;AAAA,EACjE,OAAO,wBAAwB,QAAQ;AAAA,IACtC,aAAa;AAAA,IACb,SAAS,QAAQ;AAAA,EAClB,CAAC;AAAA;",
|
|
9
|
-
"debugId": "FF3F274BBCF0781464756E2164756E21",
|
|
10
|
-
"names": []
|
|
11
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// src/actions/wallet/sponsorTransaction.ts
|
|
2
|
-
async function sponsorTransaction(client, params) {
|
|
3
|
-
const { transaction } = params;
|
|
4
|
-
if (transaction.auth.authType !== AuthType.Sponsored) {
|
|
5
|
-
throw new Error("Transaction must have sponsored authorization");
|
|
6
|
-
}
|
|
7
|
-
const account = client.account;
|
|
8
|
-
if (!account)
|
|
9
|
-
throw new Error("Account required");
|
|
10
|
-
if (isProviderAccount(account)) {
|
|
11
|
-
throw new Error("Provider accounts cannot sponsor transactions");
|
|
12
|
-
}
|
|
13
|
-
const nonce = params.nonce != null ? intToBigInt(params.nonce) : await resolveNonce(client, account.address);
|
|
14
|
-
const fee = await resolveFee(client, transaction, params.fee);
|
|
15
|
-
const sponsorCondition = createSingleSigSpendingCondition(account.publicKey, nonce, fee);
|
|
16
|
-
const auth = transaction.auth;
|
|
17
|
-
const sponsored = {
|
|
18
|
-
...transaction,
|
|
19
|
-
auth: {
|
|
20
|
-
...auth,
|
|
21
|
-
sponsorSpendingCondition: sponsorCondition
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
return signSponsorWithAccount(sponsored, account);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
//# debugId=2C7F1B8FDFB94A5364756E2164756E21
|
|
28
|
-
//# sourceMappingURL=stacks-44y18a8e.cjs.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/actions/wallet/sponsorTransaction.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { Client } from \"../../clients/types.ts\";\nimport { createSingleSigSpendingCondition } from \"../../transactions/authorization.ts\";\nimport { signSponsorWithAccount } from \"../../transactions/signer.ts\";\nimport {\n\tAuthType,\n\ttype SponsoredAuthorization,\n\ttype StacksTransaction,\n} from \"../../transactions/types.ts\";\nimport type { IntegerType } from \"../../utils/encoding.ts\";\nimport { intToBigInt } from \"../../utils/encoding.ts\";\nimport { resolveNonce } from \"./nonceManager.ts\";\nimport { type FeeParam, isProviderAccount, resolveFee } from \"./utils.ts\";\n\nexport type SponsorTransactionParams = {\n\ttransaction: StacksTransaction;\n\tfee?: FeeParam;\n\tnonce?: IntegerType;\n};\n\n/** Sponsor a transaction: set sponsor spending condition, sign as sponsor */\nexport async function sponsorTransaction(\n\tclient: Client,\n\tparams: SponsorTransactionParams,\n): Promise<StacksTransaction> {\n\tconst { transaction } = params;\n\n\tif (transaction.auth.authType !== AuthType.Sponsored) {\n\t\tthrow new Error(\"Transaction must have sponsored authorization\");\n\t}\n\n\tconst account = client.account;\n\tif (!account) throw new Error(\"Account required\");\n\tif (isProviderAccount(account)) {\n\t\tthrow new Error(\"Provider accounts cannot sponsor transactions\");\n\t}\n\n\t// Resolve sponsor nonce\n\tconst nonce =\n\t\tparams.nonce != null\n\t\t\t? intToBigInt(params.nonce)\n\t\t\t: await resolveNonce(client, account.address);\n\n\t// Resolve sponsor fee. Estimation failure falls back to the minimum relay\n\t// fee instead of 0 (a 0-fee tx would be rejected at broadcast).\n\tconst fee = await resolveFee(client, transaction, params.fee);\n\n\t// Create sponsor spending condition\n\tconst sponsorCondition = createSingleSigSpendingCondition(\n\t\taccount.publicKey,\n\t\tnonce,\n\t\tfee,\n\t);\n\n\t// Set sponsor spending condition on the tx\n\tconst auth = transaction.auth as SponsoredAuthorization;\n\tconst sponsored: StacksTransaction = {\n\t\t...transaction,\n\t\tauth: {\n\t\t\t...auth,\n\t\t\tsponsorSpendingCondition: sponsorCondition,\n\t\t},\n\t};\n\n\t// Sign as sponsor\n\treturn signSponsorWithAccount(sponsored, account);\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";AAoBA,eAAsB,kBAAkB,CACvC,QACA,QAC6B;AAAA,EAC7B,QAAQ,gBAAgB;AAAA,EAExB,IAAI,YAAY,KAAK,aAAa,SAAS,WAAW;AAAA,IACrD,MAAM,IAAI,MAAM,+CAA+C;AAAA,EAChE;AAAA,EAEA,MAAM,UAAU,OAAO;AAAA,EACvB,IAAI,CAAC;AAAA,IAAS,MAAM,IAAI,MAAM,kBAAkB;AAAA,EAChD,IAAI,kBAAkB,OAAO,GAAG;AAAA,IAC/B,MAAM,IAAI,MAAM,+CAA+C;AAAA,EAChE;AAAA,EAGA,MAAM,QACL,OAAO,SAAS,OACb,YAAY,OAAO,KAAK,IACxB,MAAM,aAAa,QAAQ,QAAQ,OAAO;AAAA,EAI9C,MAAM,MAAM,MAAM,WAAW,QAAQ,aAAa,OAAO,GAAG;AAAA,EAG5D,MAAM,mBAAmB,iCACxB,QAAQ,WACR,OACA,GACD;AAAA,EAGA,MAAM,OAAO,YAAY;AAAA,EACzB,MAAM,YAA+B;AAAA,OACjC;AAAA,IACH,MAAM;AAAA,SACF;AAAA,MACH,0BAA0B;AAAA,IAC3B;AAAA,EACD;AAAA,EAGA,OAAO,uBAAuB,WAAW,OAAO;AAAA;",
|
|
8
|
-
"debugId": "2C7F1B8FDFB94A5364756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/postconditions/builder.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { ClarityValue } from \"../clarity/types.ts\";\nimport { parseContractId, validateStacksAddress } from \"../utils/address.ts\";\nimport { type IntegerType, intToBigInt } from \"../utils/encoding.ts\";\nimport type {\n\tFtPostCondition,\n\tFungibleComparator,\n\tNftPostCondition,\n\tNonFungibleComparator,\n\tStxPostCondition,\n} from \"./types.ts\";\n\nclass PartialPcWithPrincipal {\n\tconstructor(private address: string) {}\n\n\twillSendEq(amount: IntegerType) {\n\t\treturn new PartialPcFtWithCode(this.address, amount, \"eq\");\n\t}\n\twillSendGte(amount: IntegerType) {\n\t\treturn new PartialPcFtWithCode(this.address, amount, \"gte\");\n\t}\n\twillSendGt(amount: IntegerType) {\n\t\treturn new PartialPcFtWithCode(this.address, amount, \"gt\");\n\t}\n\twillSendLte(amount: IntegerType) {\n\t\treturn new PartialPcFtWithCode(this.address, amount, \"lte\");\n\t}\n\twillSendLt(amount: IntegerType) {\n\t\treturn new PartialPcFtWithCode(this.address, amount, \"lt\");\n\t}\n\twillSendAsset() {\n\t\treturn new PartialPcNftWithCode(this.address, \"sent\");\n\t}\n\twillNotSendAsset() {\n\t\treturn new PartialPcNftWithCode(this.address, \"not-sent\");\n\t}\n}\n\nclass PartialPcFtWithCode {\n\tconstructor(\n\t\tprivate address: string,\n\t\tprivate amount: IntegerType,\n\t\tprivate code: FungibleComparator,\n\t) {}\n\n\tustx(): StxPostCondition {\n\t\treturn {\n\t\t\ttype: \"stx-postcondition\",\n\t\t\taddress: this.address,\n\t\t\tcondition: this.code,\n\t\t\tamount: intToBigInt(this.amount).toString(),\n\t\t};\n\t}\n\n\tft(contractId: string, tokenName: string): FtPostCondition {\n\t\tconst [address, name] = contractId.split(\".\");\n\t\tif (!address || !validateStacksAddress(address) || !name) {\n\t\t\tthrow new Error(`Invalid contract id: ${contractId}`);\n\t\t}\n\t\treturn {\n\t\t\ttype: \"ft-postcondition\",\n\t\t\taddress: this.address,\n\t\t\tcondition: this.code,\n\t\t\tamount: intToBigInt(this.amount).toString(),\n\t\t\tasset: `${contractId}::${tokenName}`,\n\t\t};\n\t}\n}\n\nclass PartialPcNftWithCode {\n\tconstructor(\n\t\tprivate address: string,\n\t\tprivate code: NonFungibleComparator,\n\t) {}\n\n\tnft(\n\t\tassetOrContractId: string,\n\t\ttokenNameOrAssetId: string | ClarityValue,\n\t\tassetId?: ClarityValue,\n\t): NftPostCondition {\n\t\tlet contractAddress: string;\n\t\tlet contractName: string;\n\t\tlet tokenName: string;\n\t\tlet id: ClarityValue;\n\n\t\tif (assetId !== undefined) {\n\t\t\t// 3 args: contractId, tokenName, assetId\n\t\t\t[contractAddress, contractName] = parseContractId(assetOrContractId);\n\t\t\ttokenName = tokenNameOrAssetId as string;\n\t\t\tid = assetId;\n\t\t} else {\n\t\t\t// 2 args: assetString (addr.contract::token), assetId\n\t\t\tconst [principal, tName] = assetOrContractId.split(\"::\");\n\t\t\tif (!principal || !tName)\n\t\t\t\tthrow new Error(`Invalid asset name: ${assetOrContractId}`);\n\t\t\t[contractAddress, contractName] = parseContractId(principal);\n\t\t\ttokenName = tName;\n\t\t\tid = tokenNameOrAssetId as ClarityValue;\n\t\t}\n\n\t\tif (!validateStacksAddress(contractAddress)) {\n\t\t\tthrow new Error(`Invalid contract address: ${contractAddress}`);\n\t\t}\n\n\t\treturn {\n\t\t\ttype: \"nft-postcondition\",\n\t\t\taddress: this.address,\n\t\t\tcondition: this.code,\n\t\t\tasset: `${contractAddress}.${contractName}::${tokenName}`,\n\t\t\tassetId: id,\n\t\t};\n\t}\n}\n\nexport const Pc = {\n\tprincipal(address: string) {\n\t\tconst [addr, name] = address.split(\".\");\n\t\tif (\n\t\t\t!addr ||\n\t\t\t!validateStacksAddress(addr) ||\n\t\t\t(typeof name === \"string\" && !name)\n\t\t) {\n\t\t\tthrow new Error(`Invalid principal: ${address}`);\n\t\t}\n\t\treturn new PartialPcWithPrincipal(address);\n\t},\n\torigin() {\n\t\treturn new PartialPcWithPrincipal(\"origin\");\n\t},\n};\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "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",
|
|
8
|
-
"debugId": "AD0585B08DA6241D64756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/errors/response.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { BaseError } from \"./base.ts\";\n\n/** Thrown when a node/API response is missing an expected field. */\nexport class MalformedResponseError extends BaseError {\n\toverride name = \"MalformedResponseError\";\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";AAGO,MAAM,+BAA+B,UAAU;AAAA,EAC5C,OAAO;AACjB;",
|
|
8
|
-
"debugId": "31C375B5C92A878E64756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/postconditions/builder.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { ClarityValue } from \"../clarity/types.ts\";\nimport { parseContractId, validateStacksAddress } from \"../utils/address.ts\";\nimport { type IntegerType, intToBigInt } from \"../utils/encoding.ts\";\nimport type {\n\tFtPostCondition,\n\tFungibleComparator,\n\tNftPostCondition,\n\tNonFungibleComparator,\n\tStxPostCondition,\n} from \"./types.ts\";\n\nclass PartialPcWithPrincipal {\n\tconstructor(private address: string) {}\n\n\twillSendEq(amount: IntegerType) {\n\t\treturn new PartialPcFtWithCode(this.address, amount, \"eq\");\n\t}\n\twillSendGte(amount: IntegerType) {\n\t\treturn new PartialPcFtWithCode(this.address, amount, \"gte\");\n\t}\n\twillSendGt(amount: IntegerType) {\n\t\treturn new PartialPcFtWithCode(this.address, amount, \"gt\");\n\t}\n\twillSendLte(amount: IntegerType) {\n\t\treturn new PartialPcFtWithCode(this.address, amount, \"lte\");\n\t}\n\twillSendLt(amount: IntegerType) {\n\t\treturn new PartialPcFtWithCode(this.address, amount, \"lt\");\n\t}\n\twillSendAsset() {\n\t\treturn new PartialPcNftWithCode(this.address, \"sent\");\n\t}\n\twillNotSendAsset() {\n\t\treturn new PartialPcNftWithCode(this.address, \"not-sent\");\n\t}\n}\n\nclass PartialPcFtWithCode {\n\tconstructor(\n\t\tprivate address: string,\n\t\tprivate amount: IntegerType,\n\t\tprivate code: FungibleComparator,\n\t) {}\n\n\tustx(): StxPostCondition {\n\t\treturn {\n\t\t\ttype: \"stx-postcondition\",\n\t\t\taddress: this.address,\n\t\t\tcondition: this.code,\n\t\t\tamount: intToBigInt(this.amount).toString(),\n\t\t};\n\t}\n\n\tft(contractId: string, tokenName: string): FtPostCondition {\n\t\tconst [address, name] = contractId.split(\".\");\n\t\tif (!address || !validateStacksAddress(address) || !name) {\n\t\t\tthrow new Error(`Invalid contract id: ${contractId}`);\n\t\t}\n\t\treturn {\n\t\t\ttype: \"ft-postcondition\",\n\t\t\taddress: this.address,\n\t\t\tcondition: this.code,\n\t\t\tamount: intToBigInt(this.amount).toString(),\n\t\t\tasset: `${contractId}::${tokenName}`,\n\t\t};\n\t}\n}\n\nclass PartialPcNftWithCode {\n\tconstructor(\n\t\tprivate address: string,\n\t\tprivate code: NonFungibleComparator,\n\t) {}\n\n\tnft(\n\t\tassetOrContractId: string,\n\t\ttokenNameOrAssetId: string | ClarityValue,\n\t\tassetId?: ClarityValue,\n\t): NftPostCondition {\n\t\tlet contractAddress: string;\n\t\tlet contractName: string;\n\t\tlet tokenName: string;\n\t\tlet id: ClarityValue;\n\n\t\tif (assetId !== undefined) {\n\t\t\t// 3 args: contractId, tokenName, assetId\n\t\t\t[contractAddress, contractName] = parseContractId(assetOrContractId);\n\t\t\ttokenName = tokenNameOrAssetId as string;\n\t\t\tid = assetId;\n\t\t} else {\n\t\t\t// 2 args: assetString (addr.contract::token), assetId\n\t\t\tconst [principal, tName] = assetOrContractId.split(\"::\");\n\t\t\tif (!principal || !tName)\n\t\t\t\tthrow new Error(`Invalid asset name: ${assetOrContractId}`);\n\t\t\t[contractAddress, contractName] = parseContractId(principal);\n\t\t\ttokenName = tName;\n\t\t\tid = tokenNameOrAssetId as ClarityValue;\n\t\t}\n\n\t\tif (!validateStacksAddress(contractAddress)) {\n\t\t\tthrow new Error(`Invalid contract address: ${contractAddress}`);\n\t\t}\n\n\t\treturn {\n\t\t\ttype: \"nft-postcondition\",\n\t\t\taddress: this.address,\n\t\t\tcondition: this.code,\n\t\t\tasset: `${contractAddress}.${contractName}::${tokenName}`,\n\t\t\tassetId: id,\n\t\t};\n\t}\n}\n\nexport const Pc = {\n\tprincipal(address: string) {\n\t\tconst [addr, name] = address.split(\".\");\n\t\tif (\n\t\t\t!addr ||\n\t\t\t!validateStacksAddress(addr) ||\n\t\t\t(typeof name === \"string\" && !name)\n\t\t) {\n\t\t\tthrow new Error(`Invalid principal: ${address}`);\n\t\t}\n\t\treturn new PartialPcWithPrincipal(address);\n\t},\n\torigin() {\n\t\treturn new PartialPcWithPrincipal(\"origin\");\n\t},\n};\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "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",
|
|
8
|
-
"debugId": "596DCED919FAD1C264756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// src/postconditions/index.ts
|
|
2
|
-
var exports_postconditions = {};
|
|
3
|
-
__export(exports_postconditions, {
|
|
4
|
-
Pc: () => Pc
|
|
5
|
-
});
|
|
6
|
-
module.exports = __toCommonJS(exports_postconditions);
|
|
7
|
-
|
|
8
|
-
//# debugId=826C758A4223AE2664756E2164756E21
|
|
9
|
-
//# sourceMappingURL=stacks-d6pgp4qk.cjs.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BaseError
|
|
3
|
-
} from "./stacks-709tra19.js";
|
|
4
|
-
|
|
5
|
-
// src/errors/response.ts
|
|
6
|
-
class MalformedResponseError extends BaseError {
|
|
7
|
-
name = "MalformedResponseError";
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { MalformedResponseError };
|
|
11
|
-
|
|
12
|
-
//# debugId=93346D5AC0126F7F64756E2164756E21
|
|
13
|
-
//# sourceMappingURL=stacks-fh48neva.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/errors/response.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { BaseError } from \"./base.ts\";\n\n/** Thrown when a node/API response is missing an expected field. */\nexport class MalformedResponseError extends BaseError {\n\toverride name = \"MalformedResponseError\";\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";;;;;AAGO,MAAM,+BAA+B,UAAU;AAAA,EAC5C,OAAO;AACjB;",
|
|
8
|
-
"debugId": "93346D5AC0126F7F64756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|