@across-protocol/contracts 4.0.13 → 4.0.14-alpha.2
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 +6 -2
- package/dist/deployments/deployments.json +5 -5
- package/dist/scripts/svm/buildHelpers/generateSvmClients.js +8 -4
- package/dist/scripts/svm/closeRelayerPdas.js +1 -1
- package/dist/scripts/svm/fakeFillWithRandomDistribution.js +8 -7
- package/dist/scripts/svm/findFillStatusPdaFromEvent.js +1 -1
- package/dist/scripts/svm/nativeDeposit.js +3 -3
- package/dist/scripts/svm/queryEvents.js +1 -1
- package/dist/scripts/svm/queryEventsV2.js +1 -1
- package/dist/scripts/svm/queryFills.js +1 -1
- package/dist/scripts/svm/simpleDeposit.js +3 -3
- package/dist/scripts/svm/simpleFakeRelayerRepayment.js +19 -12
- package/dist/scripts/svm/simpleFill.js +2 -2
- package/dist/src/svm/assets/idl/multicall_handler.json +1 -1
- package/dist/src/svm/assets/idl/svm_spoke.json +124 -69
- package/dist/src/svm/assets/multicall_handler.d.ts +1 -1
- package/dist/src/svm/assets/svm_spoke.d.ts +124 -69
- package/dist/src/svm/clients/MulticallHandler/programs/multicallHandler.d.ts +2 -2
- package/dist/src/svm/clients/MulticallHandler/programs/multicallHandler.js +1 -1
- package/dist/src/svm/clients/SvmSpoke/errors/svmSpoke.d.ts +37 -31
- package/dist/src/svm/clients/SvmSpoke/errors/svmSpoke.js +55 -46
- package/dist/src/svm/clients/SvmSpoke/instructions/bridgeTokensToHubPool.js +1 -1
- package/dist/src/svm/clients/SvmSpoke/instructions/claimRelayerRefund.js +1 -1
- package/dist/src/svm/clients/SvmSpoke/instructions/deposit.d.ts +2 -2
- package/dist/src/svm/clients/SvmSpoke/instructions/deposit.js +4 -4
- package/dist/src/svm/clients/SvmSpoke/instructions/depositNow.d.ts +2 -2
- package/dist/src/svm/clients/SvmSpoke/instructions/depositNow.js +4 -4
- package/dist/src/svm/clients/SvmSpoke/instructions/executeRelayerRefundLeaf.js +1 -1
- package/dist/src/svm/clients/SvmSpoke/instructions/executeRelayerRefundLeafDeferred.js +1 -1
- package/dist/src/svm/clients/SvmSpoke/instructions/executeSlowRelayLeaf.js +2 -2
- package/dist/src/svm/clients/SvmSpoke/instructions/fillRelay.js +1 -1
- package/dist/src/svm/clients/SvmSpoke/instructions/handleReceiveMessage.d.ts +1 -1
- package/dist/src/svm/clients/SvmSpoke/instructions/handleReceiveMessage.js +6 -6
- package/dist/src/svm/clients/SvmSpoke/instructions/unsafeDeposit.d.ts +2 -2
- package/dist/src/svm/clients/SvmSpoke/instructions/unsafeDeposit.js +4 -4
- package/dist/src/svm/clients/SvmSpoke/programs/svmSpoke.d.ts +2 -2
- package/dist/src/svm/clients/SvmSpoke/programs/svmSpoke.js +1 -1
- package/dist/src/svm/clients/SvmSpoke/types/filledRelay.d.ts +2 -2
- package/dist/src/svm/clients/SvmSpoke/types/filledRelay.js +2 -2
- package/dist/src/svm/clients/SvmSpoke/types/fundsDeposited.d.ts +2 -2
- package/dist/src/svm/clients/SvmSpoke/types/fundsDeposited.js +2 -2
- package/dist/src/svm/clients/SvmSpoke/types/relayData.d.ts +2 -2
- package/dist/src/svm/clients/SvmSpoke/types/relayData.js +2 -2
- package/dist/src/svm/clients/SvmSpoke/types/requestedSlowFill.d.ts +2 -2
- package/dist/src/svm/clients/SvmSpoke/types/requestedSlowFill.js +2 -2
- package/dist/src/svm/clients/index.d.ts +1 -3
- package/dist/src/svm/clients/index.js +1 -5
- package/dist/src/svm/web3-v1/helpers.d.ts +6 -6
- package/dist/src/svm/web3-v1/helpers.js +2 -2
- package/dist/src/svm/web3-v1/relayHashUtils.js +3 -3
- package/dist/src/svm/web3-v1/solanaProgramUtils.d.ts +1 -1
- package/dist/src/svm/web3-v1/solanaProgramUtils.js +17 -7
- package/dist/src/types/svm.d.ts +3 -3
- package/dist/target/types/multicall_handler.d.ts +1 -1
- package/dist/target/types/svm_spoke.d.ts +124 -69
- package/dist/test/svm/SvmSpoke.Deposit.js +21 -3
- package/dist/test/svm/SvmSpoke.Fill.AcrossPlus.js +3 -3
- package/dist/test/svm/SvmSpoke.Fill.js +3 -3
- package/dist/test/svm/SvmSpoke.SlowFill.AcrossPlus.js +3 -3
- package/dist/test/svm/SvmSpoke.SlowFill.js +2 -2
- package/dist/test/svm/SvmSpoke.common.js +1 -1
- package/package.json +4 -4
- package/dist/src/svm/clients/MessageTransmitter/accounts/index.d.ts +0 -10
- package/dist/src/svm/clients/MessageTransmitter/accounts/index.js +0 -26
- package/dist/src/svm/clients/MessageTransmitter/accounts/messageSent.d.ts +0 -28
- package/dist/src/svm/clients/MessageTransmitter/accounts/messageSent.js +0 -64
- package/dist/src/svm/clients/MessageTransmitter/accounts/messageTransmitter.d.ts +0 -46
- package/dist/src/svm/clients/MessageTransmitter/accounts/messageTransmitter.js +0 -82
- package/dist/src/svm/clients/MessageTransmitter/accounts/usedNonces.d.ts +0 -31
- package/dist/src/svm/clients/MessageTransmitter/accounts/usedNonces.js +0 -70
- package/dist/src/svm/clients/MessageTransmitter/errors/index.d.ts +0 -8
- package/dist/src/svm/clients/MessageTransmitter/errors/index.js +0 -24
- package/dist/src/svm/clients/MessageTransmitter/errors/messageTransmitter.d.ts +0 -83
- package/dist/src/svm/clients/MessageTransmitter/errors/messageTransmitter.js +0 -124
- package/dist/src/svm/clients/MessageTransmitter/index.d.ts +0 -12
- package/dist/src/svm/clients/MessageTransmitter/index.js +0 -28
- package/dist/src/svm/clients/MessageTransmitter/instructions/acceptOwnership.d.ts +0 -45
- package/dist/src/svm/clients/MessageTransmitter/instructions/acceptOwnership.js +0 -85
- package/dist/src/svm/clients/MessageTransmitter/instructions/disableAttester.d.ts +0 -55
- package/dist/src/svm/clients/MessageTransmitter/instructions/disableAttester.js +0 -105
- package/dist/src/svm/clients/MessageTransmitter/instructions/enableAttester.d.ts +0 -55
- package/dist/src/svm/clients/MessageTransmitter/instructions/enableAttester.js +0 -105
- package/dist/src/svm/clients/MessageTransmitter/instructions/getNoncePda.d.ts +0 -43
- package/dist/src/svm/clients/MessageTransmitter/instructions/getNoncePda.js +0 -82
- package/dist/src/svm/clients/MessageTransmitter/instructions/index.d.ts +0 -25
- package/dist/src/svm/clients/MessageTransmitter/instructions/index.js +0 -41
- package/dist/src/svm/clients/MessageTransmitter/instructions/initialize.d.ts +0 -70
- package/dist/src/svm/clients/MessageTransmitter/instructions/initialize.js +0 -123
- package/dist/src/svm/clients/MessageTransmitter/instructions/isNonceUsed.d.ts +0 -42
- package/dist/src/svm/clients/MessageTransmitter/instructions/isNonceUsed.js +0 -77
- package/dist/src/svm/clients/MessageTransmitter/instructions/pause.d.ts +0 -45
- package/dist/src/svm/clients/MessageTransmitter/instructions/pause.js +0 -85
- package/dist/src/svm/clients/MessageTransmitter/instructions/receiveMessage.d.ts +0 -67
- package/dist/src/svm/clients/MessageTransmitter/instructions/receiveMessage.js +0 -113
- package/dist/src/svm/clients/MessageTransmitter/instructions/reclaimEventAccount.d.ts +0 -48
- package/dist/src/svm/clients/MessageTransmitter/instructions/reclaimEventAccount.js +0 -94
- package/dist/src/svm/clients/MessageTransmitter/instructions/replaceMessage.d.ts +0 -64
- package/dist/src/svm/clients/MessageTransmitter/instructions/replaceMessage.js +0 -132
- package/dist/src/svm/clients/MessageTransmitter/instructions/sendMessage.d.ts +0 -61
- package/dist/src/svm/clients/MessageTransmitter/instructions/sendMessage.js +0 -112
- package/dist/src/svm/clients/MessageTransmitter/instructions/sendMessageWithCaller.d.ts +0 -64
- package/dist/src/svm/clients/MessageTransmitter/instructions/sendMessageWithCaller.js +0 -117
- package/dist/src/svm/clients/MessageTransmitter/instructions/setMaxMessageBodySize.d.ts +0 -49
- package/dist/src/svm/clients/MessageTransmitter/instructions/setMaxMessageBodySize.js +0 -94
- package/dist/src/svm/clients/MessageTransmitter/instructions/setSignatureThreshold.d.ts +0 -49
- package/dist/src/svm/clients/MessageTransmitter/instructions/setSignatureThreshold.js +0 -97
- package/dist/src/svm/clients/MessageTransmitter/instructions/transferOwnership.d.ts +0 -49
- package/dist/src/svm/clients/MessageTransmitter/instructions/transferOwnership.js +0 -91
- package/dist/src/svm/clients/MessageTransmitter/instructions/unpause.d.ts +0 -45
- package/dist/src/svm/clients/MessageTransmitter/instructions/unpause.js +0 -85
- package/dist/src/svm/clients/MessageTransmitter/instructions/updateAttesterManager.d.ts +0 -49
- package/dist/src/svm/clients/MessageTransmitter/instructions/updateAttesterManager.js +0 -94
- package/dist/src/svm/clients/MessageTransmitter/instructions/updatePauser.d.ts +0 -49
- package/dist/src/svm/clients/MessageTransmitter/instructions/updatePauser.js +0 -91
- package/dist/src/svm/clients/MessageTransmitter/programs/index.d.ts +0 -8
- package/dist/src/svm/clients/MessageTransmitter/programs/index.js +0 -24
- package/dist/src/svm/clients/MessageTransmitter/programs/messageTransmitter.d.ts +0 -78
- package/dist/src/svm/clients/MessageTransmitter/programs/messageTransmitter.js +0 -112
- package/dist/src/svm/clients/MessageTransmitter/shared/index.d.ts +0 -49
- package/dist/src/svm/clients/MessageTransmitter/shared/index.js +0 -94
- package/dist/src/svm/clients/MessageTransmitter/types/attesterDisabled.d.ts +0 -15
- package/dist/src/svm/clients/MessageTransmitter/types/attesterDisabled.js +0 -22
- package/dist/src/svm/clients/MessageTransmitter/types/attesterEnabled.d.ts +0 -15
- package/dist/src/svm/clients/MessageTransmitter/types/attesterEnabled.js +0 -22
- package/dist/src/svm/clients/MessageTransmitter/types/attesterManagerUpdated.d.ts +0 -16
- package/dist/src/svm/clients/MessageTransmitter/types/attesterManagerUpdated.js +0 -28
- package/dist/src/svm/clients/MessageTransmitter/types/handleReceiveMessageParams.d.ts +0 -18
- package/dist/src/svm/clients/MessageTransmitter/types/handleReceiveMessageParams.js +0 -32
- package/dist/src/svm/clients/MessageTransmitter/types/index.d.ts +0 -20
- package/dist/src/svm/clients/MessageTransmitter/types/index.js +0 -36
- package/dist/src/svm/clients/MessageTransmitter/types/mathError.d.ts +0 -17
- package/dist/src/svm/clients/MessageTransmitter/types/mathError.js +0 -29
- package/dist/src/svm/clients/MessageTransmitter/types/maxMessageBodySizeUpdated.d.ts +0 -17
- package/dist/src/svm/clients/MessageTransmitter/types/maxMessageBodySizeUpdated.js +0 -22
- package/dist/src/svm/clients/MessageTransmitter/types/messageReceived.d.ts +0 -25
- package/dist/src/svm/clients/MessageTransmitter/types/messageReceived.js +0 -34
- package/dist/src/svm/clients/MessageTransmitter/types/ownershipTransferStarted.d.ts +0 -16
- package/dist/src/svm/clients/MessageTransmitter/types/ownershipTransferStarted.js +0 -28
- package/dist/src/svm/clients/MessageTransmitter/types/ownershipTransferred.d.ts +0 -16
- package/dist/src/svm/clients/MessageTransmitter/types/ownershipTransferred.js +0 -28
- package/dist/src/svm/clients/MessageTransmitter/types/pause.d.ts +0 -13
- package/dist/src/svm/clients/MessageTransmitter/types/pause.js +0 -22
- package/dist/src/svm/clients/MessageTransmitter/types/pauserChanged.d.ts +0 -15
- package/dist/src/svm/clients/MessageTransmitter/types/pauserChanged.js +0 -22
- package/dist/src/svm/clients/MessageTransmitter/types/signatureThresholdUpdated.d.ts +0 -16
- package/dist/src/svm/clients/MessageTransmitter/types/signatureThresholdUpdated.js +0 -28
- package/dist/src/svm/clients/MessageTransmitter/types/unpause.d.ts +0 -13
- package/dist/src/svm/clients/MessageTransmitter/types/unpause.js +0 -22
- package/dist/src/svm/clients/TokenMessengerMinter/accounts/index.d.ts +0 -12
- package/dist/src/svm/clients/TokenMessengerMinter/accounts/index.js +0 -28
- package/dist/src/svm/clients/TokenMessengerMinter/accounts/localToken.d.ts +0 -43
- package/dist/src/svm/clients/TokenMessengerMinter/accounts/localToken.js +0 -82
- package/dist/src/svm/clients/TokenMessengerMinter/accounts/remoteTokenMessenger.d.ts +0 -29
- package/dist/src/svm/clients/TokenMessengerMinter/accounts/remoteTokenMessenger.js +0 -71
- package/dist/src/svm/clients/TokenMessengerMinter/accounts/tokenMessenger.d.ts +0 -35
- package/dist/src/svm/clients/TokenMessengerMinter/accounts/tokenMessenger.js +0 -74
- package/dist/src/svm/clients/TokenMessengerMinter/accounts/tokenMinter.d.ts +0 -33
- package/dist/src/svm/clients/TokenMessengerMinter/accounts/tokenMinter.js +0 -72
- package/dist/src/svm/clients/TokenMessengerMinter/accounts/tokenPair.d.ts +0 -33
- package/dist/src/svm/clients/TokenMessengerMinter/accounts/tokenPair.js +0 -72
- package/dist/src/svm/clients/TokenMessengerMinter/errors/index.d.ts +0 -8
- package/dist/src/svm/clients/TokenMessengerMinter/errors/index.js +0 -24
- package/dist/src/svm/clients/TokenMessengerMinter/errors/tokenMessengerMinter.d.ts +0 -45
- package/dist/src/svm/clients/TokenMessengerMinter/errors/tokenMessengerMinter.js +0 -67
- package/dist/src/svm/clients/TokenMessengerMinter/index.d.ts +0 -12
- package/dist/src/svm/clients/TokenMessengerMinter/index.js +0 -28
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/acceptOwnership.d.ts +0 -45
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/acceptOwnership.js +0 -82
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/addLocalToken.d.ts +0 -63
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/addLocalToken.js +0 -115
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/addRemoteTokenMessenger.d.ts +0 -61
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/addRemoteTokenMessenger.js +0 -110
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/burnTokenCustody.d.ts +0 -64
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/burnTokenCustody.js +0 -117
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/depositForBurn.d.ts +0 -94
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/depositForBurn.js +0 -161
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/depositForBurnWithCaller.d.ts +0 -97
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/depositForBurnWithCaller.js +0 -166
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/handleReceiveMessage.d.ts +0 -79
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/handleReceiveMessage.js +0 -132
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/index.d.ts +0 -26
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/index.js +0 -42
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/initialize.d.ts +0 -73
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/initialize.js +0 -124
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/linkTokenPair.d.ts +0 -64
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/linkTokenPair.js +0 -109
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/pause.d.ts +0 -45
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/pause.js +0 -82
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/removeLocalToken.d.ts +0 -57
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/removeLocalToken.js +0 -105
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/removeRemoteTokenMessenger.d.ts +0 -51
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/removeRemoteTokenMessenger.js +0 -94
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/replaceDepositForBurn.d.ts +0 -79
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/replaceDepositForBurn.js +0 -150
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/setMaxBurnAmountPerMessage.d.ts +0 -52
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/setMaxBurnAmountPerMessage.js +0 -97
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/setTokenController.d.ts +0 -52
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/setTokenController.js +0 -91
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/transferOwnership.d.ts +0 -49
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/transferOwnership.js +0 -88
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/unlinkTokenPair.d.ts +0 -51
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/unlinkTokenPair.js +0 -91
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/unpause.d.ts +0 -45
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/unpause.js +0 -82
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/updatePauser.d.ts +0 -52
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/updatePauser.js +0 -91
- package/dist/src/svm/clients/TokenMessengerMinter/programs/index.d.ts +0 -8
- package/dist/src/svm/clients/TokenMessengerMinter/programs/index.js +0 -24
- package/dist/src/svm/clients/TokenMessengerMinter/programs/tokenMessengerMinter.d.ts +0 -83
- package/dist/src/svm/clients/TokenMessengerMinter/programs/tokenMessengerMinter.js +0 -124
- package/dist/src/svm/clients/TokenMessengerMinter/shared/index.d.ts +0 -49
- package/dist/src/svm/clients/TokenMessengerMinter/shared/index.js +0 -94
- package/dist/src/svm/clients/TokenMessengerMinter/types/depositForBurn.d.ts +0 -31
- package/dist/src/svm/clients/TokenMessengerMinter/types/depositForBurn.js +0 -40
- package/dist/src/svm/clients/TokenMessengerMinter/types/index.d.ts +0 -24
- package/dist/src/svm/clients/TokenMessengerMinter/types/index.js +0 -40
- package/dist/src/svm/clients/TokenMessengerMinter/types/localTokenAdded.d.ts +0 -16
- package/dist/src/svm/clients/TokenMessengerMinter/types/localTokenAdded.js +0 -28
- package/dist/src/svm/clients/TokenMessengerMinter/types/localTokenRemoved.d.ts +0 -16
- package/dist/src/svm/clients/TokenMessengerMinter/types/localTokenRemoved.js +0 -28
- package/dist/src/svm/clients/TokenMessengerMinter/types/mintAndWithdraw.d.ts +0 -21
- package/dist/src/svm/clients/TokenMessengerMinter/types/mintAndWithdraw.js +0 -30
- package/dist/src/svm/clients/TokenMessengerMinter/types/ownershipTransferStarted.d.ts +0 -16
- package/dist/src/svm/clients/TokenMessengerMinter/types/ownershipTransferStarted.js +0 -28
- package/dist/src/svm/clients/TokenMessengerMinter/types/ownershipTransferred.d.ts +0 -16
- package/dist/src/svm/clients/TokenMessengerMinter/types/ownershipTransferred.js +0 -28
- package/dist/src/svm/clients/TokenMessengerMinter/types/pause.d.ts +0 -13
- package/dist/src/svm/clients/TokenMessengerMinter/types/pause.js +0 -22
- package/dist/src/svm/clients/TokenMessengerMinter/types/pauserChanged.d.ts +0 -15
- package/dist/src/svm/clients/TokenMessengerMinter/types/pauserChanged.js +0 -22
- package/dist/src/svm/clients/TokenMessengerMinter/types/remoteTokenMessengerAdded.d.ts +0 -16
- package/dist/src/svm/clients/TokenMessengerMinter/types/remoteTokenMessengerAdded.js +0 -28
- package/dist/src/svm/clients/TokenMessengerMinter/types/remoteTokenMessengerRemoved.d.ts +0 -16
- package/dist/src/svm/clients/TokenMessengerMinter/types/remoteTokenMessengerRemoved.js +0 -28
- package/dist/src/svm/clients/TokenMessengerMinter/types/setBurnLimitPerMessage.d.ts +0 -19
- package/dist/src/svm/clients/TokenMessengerMinter/types/setBurnLimitPerMessage.js +0 -28
- package/dist/src/svm/clients/TokenMessengerMinter/types/setTokenController.d.ts +0 -15
- package/dist/src/svm/clients/TokenMessengerMinter/types/setTokenController.js +0 -22
- package/dist/src/svm/clients/TokenMessengerMinter/types/tokenCustodyBurned.d.ts +0 -19
- package/dist/src/svm/clients/TokenMessengerMinter/types/tokenCustodyBurned.js +0 -28
- package/dist/src/svm/clients/TokenMessengerMinter/types/tokenMinterError.d.ts +0 -23
- package/dist/src/svm/clients/TokenMessengerMinter/types/tokenMinterError.js +0 -35
- package/dist/src/svm/clients/TokenMessengerMinter/types/tokenPairLinked.d.ts +0 -17
- package/dist/src/svm/clients/TokenMessengerMinter/types/tokenPairLinked.js +0 -30
- package/dist/src/svm/clients/TokenMessengerMinter/types/tokenPairUnlinked.d.ts +0 -17
- package/dist/src/svm/clients/TokenMessengerMinter/types/tokenPairUnlinked.js +0 -30
- package/dist/src/svm/clients/TokenMessengerMinter/types/unpause.d.ts +0 -13
- package/dist/src/svm/clients/TokenMessengerMinter/types/unpause.js +0 -22
|
@@ -32,7 +32,7 @@ function getDepositInstructionDataEncoder() {
|
|
|
32
32
|
['inputToken', (0, kit_1.getAddressEncoder)()],
|
|
33
33
|
['outputToken', (0, kit_1.getAddressEncoder)()],
|
|
34
34
|
['inputAmount', (0, kit_1.getU64Encoder)()],
|
|
35
|
-
['outputAmount', (0, kit_1.
|
|
35
|
+
['outputAmount', (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 32)],
|
|
36
36
|
['destinationChainId', (0, kit_1.getU64Encoder)()],
|
|
37
37
|
['exclusiveRelayer', (0, kit_1.getAddressEncoder)()],
|
|
38
38
|
['quoteTimestamp', (0, kit_1.getU32Encoder)()],
|
|
@@ -49,7 +49,7 @@ function getDepositInstructionDataDecoder() {
|
|
|
49
49
|
['inputToken', (0, kit_1.getAddressDecoder)()],
|
|
50
50
|
['outputToken', (0, kit_1.getAddressDecoder)()],
|
|
51
51
|
['inputAmount', (0, kit_1.getU64Decoder)()],
|
|
52
|
-
['outputAmount', (0, kit_1.
|
|
52
|
+
['outputAmount', (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 32)],
|
|
53
53
|
['destinationChainId', (0, kit_1.getU64Decoder)()],
|
|
54
54
|
['exclusiveRelayer', (0, kit_1.getAddressDecoder)()],
|
|
55
55
|
['quoteTimestamp', (0, kit_1.getU32Decoder)()],
|
|
@@ -94,7 +94,7 @@ async function getDepositInstructionAsync(input, config) {
|
|
|
94
94
|
}
|
|
95
95
|
if (!accounts.depositorTokenAccount.value) {
|
|
96
96
|
accounts.depositorTokenAccount.value = await (0, kit_1.getProgramDerivedAddress)({
|
|
97
|
-
programAddress
|
|
97
|
+
programAddress,
|
|
98
98
|
seeds: [
|
|
99
99
|
(0, kit_1.getAddressEncoder)().encode((0, shared_1.expectSome)(args.depositor)),
|
|
100
100
|
(0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.tokenProgram.value)),
|
|
@@ -104,7 +104,7 @@ async function getDepositInstructionAsync(input, config) {
|
|
|
104
104
|
}
|
|
105
105
|
if (!accounts.vault.value) {
|
|
106
106
|
accounts.vault.value = await (0, kit_1.getProgramDerivedAddress)({
|
|
107
|
-
programAddress
|
|
107
|
+
programAddress,
|
|
108
108
|
seeds: [
|
|
109
109
|
(0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.state.value)),
|
|
110
110
|
(0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.tokenProgram.value)),
|
|
@@ -30,7 +30,7 @@ export type DepositNowInstructionData = {
|
|
|
30
30
|
inputToken: Address;
|
|
31
31
|
outputToken: Address;
|
|
32
32
|
inputAmount: bigint;
|
|
33
|
-
outputAmount:
|
|
33
|
+
outputAmount: ReadonlyUint8Array;
|
|
34
34
|
destinationChainId: bigint;
|
|
35
35
|
exclusiveRelayer: Address;
|
|
36
36
|
fillDeadlineOffset: number;
|
|
@@ -43,7 +43,7 @@ export type DepositNowInstructionDataArgs = {
|
|
|
43
43
|
inputToken: Address;
|
|
44
44
|
outputToken: Address;
|
|
45
45
|
inputAmount: number | bigint;
|
|
46
|
-
outputAmount:
|
|
46
|
+
outputAmount: ReadonlyUint8Array;
|
|
47
47
|
destinationChainId: number | bigint;
|
|
48
48
|
exclusiveRelayer: Address;
|
|
49
49
|
fillDeadlineOffset: number;
|
|
@@ -32,7 +32,7 @@ function getDepositNowInstructionDataEncoder() {
|
|
|
32
32
|
['inputToken', (0, kit_1.getAddressEncoder)()],
|
|
33
33
|
['outputToken', (0, kit_1.getAddressEncoder)()],
|
|
34
34
|
['inputAmount', (0, kit_1.getU64Encoder)()],
|
|
35
|
-
['outputAmount', (0, kit_1.
|
|
35
|
+
['outputAmount', (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 32)],
|
|
36
36
|
['destinationChainId', (0, kit_1.getU64Encoder)()],
|
|
37
37
|
['exclusiveRelayer', (0, kit_1.getAddressEncoder)()],
|
|
38
38
|
['fillDeadlineOffset', (0, kit_1.getU32Encoder)()],
|
|
@@ -48,7 +48,7 @@ function getDepositNowInstructionDataDecoder() {
|
|
|
48
48
|
['inputToken', (0, kit_1.getAddressDecoder)()],
|
|
49
49
|
['outputToken', (0, kit_1.getAddressDecoder)()],
|
|
50
50
|
['inputAmount', (0, kit_1.getU64Decoder)()],
|
|
51
|
-
['outputAmount', (0, kit_1.
|
|
51
|
+
['outputAmount', (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 32)],
|
|
52
52
|
['destinationChainId', (0, kit_1.getU64Decoder)()],
|
|
53
53
|
['exclusiveRelayer', (0, kit_1.getAddressDecoder)()],
|
|
54
54
|
['fillDeadlineOffset', (0, kit_1.getU32Decoder)()],
|
|
@@ -92,7 +92,7 @@ async function getDepositNowInstructionAsync(input, config) {
|
|
|
92
92
|
}
|
|
93
93
|
if (!accounts.depositorTokenAccount.value) {
|
|
94
94
|
accounts.depositorTokenAccount.value = await (0, kit_1.getProgramDerivedAddress)({
|
|
95
|
-
programAddress
|
|
95
|
+
programAddress,
|
|
96
96
|
seeds: [
|
|
97
97
|
(0, kit_1.getAddressEncoder)().encode((0, shared_1.expectSome)(args.depositor)),
|
|
98
98
|
(0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.tokenProgram.value)),
|
|
@@ -102,7 +102,7 @@ async function getDepositNowInstructionAsync(input, config) {
|
|
|
102
102
|
}
|
|
103
103
|
if (!accounts.vault.value) {
|
|
104
104
|
accounts.vault.value = await (0, kit_1.getProgramDerivedAddress)({
|
|
105
|
-
programAddress
|
|
105
|
+
programAddress,
|
|
106
106
|
seeds: [
|
|
107
107
|
(0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.state.value)),
|
|
108
108
|
(0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.tokenProgram.value)),
|
|
@@ -81,7 +81,7 @@ async function getExecuteRelayerRefundLeafInstructionAsync(input, config) {
|
|
|
81
81
|
}
|
|
82
82
|
if (!accounts.vault.value) {
|
|
83
83
|
accounts.vault.value = await (0, kit_1.getProgramDerivedAddress)({
|
|
84
|
-
programAddress
|
|
84
|
+
programAddress,
|
|
85
85
|
seeds: [
|
|
86
86
|
(0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.state.value)),
|
|
87
87
|
(0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.tokenProgram.value)),
|
|
@@ -79,7 +79,7 @@ async function getExecuteRelayerRefundLeafDeferredInstructionAsync(input, config
|
|
|
79
79
|
}
|
|
80
80
|
if (!accounts.vault.value) {
|
|
81
81
|
accounts.vault.value = await (0, kit_1.getProgramDerivedAddress)({
|
|
82
|
-
programAddress
|
|
82
|
+
programAddress,
|
|
83
83
|
seeds: [
|
|
84
84
|
(0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.state.value)),
|
|
85
85
|
(0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.tokenProgram.value)),
|
|
@@ -110,7 +110,7 @@ async function getExecuteSlowRelayLeafInstructionAsync(input, config) {
|
|
|
110
110
|
}
|
|
111
111
|
if (!accounts.recipientTokenAccount.value) {
|
|
112
112
|
accounts.recipientTokenAccount.value = await (0, kit_1.getProgramDerivedAddress)({
|
|
113
|
-
programAddress
|
|
113
|
+
programAddress,
|
|
114
114
|
seeds: [
|
|
115
115
|
(0, kit_1.getOptionEncoder)((0, types_1.getSlowFillEncoder)()).encode((0, shared_1.expectSome)(args.slowFillLeaf)),
|
|
116
116
|
(0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.tokenProgram.value)),
|
|
@@ -120,7 +120,7 @@ async function getExecuteSlowRelayLeafInstructionAsync(input, config) {
|
|
|
120
120
|
}
|
|
121
121
|
if (!accounts.vault.value) {
|
|
122
122
|
accounts.vault.value = await (0, kit_1.getProgramDerivedAddress)({
|
|
123
|
-
programAddress
|
|
123
|
+
programAddress,
|
|
124
124
|
seeds: [
|
|
125
125
|
(0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.state.value)),
|
|
126
126
|
(0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.tokenProgram.value)),
|
|
@@ -99,7 +99,7 @@ async function getFillRelayInstructionAsync(input, config) {
|
|
|
99
99
|
}
|
|
100
100
|
if (!accounts.recipientTokenAccount.value) {
|
|
101
101
|
accounts.recipientTokenAccount.value = await (0, kit_1.getProgramDerivedAddress)({
|
|
102
|
-
programAddress
|
|
102
|
+
programAddress,
|
|
103
103
|
seeds: [
|
|
104
104
|
(0, kit_1.getOptionEncoder)((0, types_1.getRelayDataEncoder)()).encode((0, shared_1.expectSome)(args.relayData)),
|
|
105
105
|
(0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.tokenProgram.value)),
|
|
@@ -9,7 +9,7 @@ import { type Address, type Codec, type Decoder, type Encoder, type IAccountMeta
|
|
|
9
9
|
import { SVM_SPOKE_PROGRAM_ADDRESS } from '../programs';
|
|
10
10
|
export declare const HANDLE_RECEIVE_MESSAGE_DISCRIMINATOR: Uint8Array;
|
|
11
11
|
export declare function getHandleReceiveMessageDiscriminatorBytes(): ReadonlyUint8Array;
|
|
12
|
-
export type HandleReceiveMessageInstruction<TProgram extends string = typeof SVM_SPOKE_PROGRAM_ADDRESS, TAccountAuthorityPda extends string | IAccountMeta<string> = string, TAccountState extends string | IAccountMeta<string> = string, TAccountSelfAuthority extends string | IAccountMeta<string> = string, TAccountProgram extends string | IAccountMeta<string> = '
|
|
12
|
+
export type HandleReceiveMessageInstruction<TProgram extends string = typeof SVM_SPOKE_PROGRAM_ADDRESS, TAccountAuthorityPda extends string | IAccountMeta<string> = string, TAccountState extends string | IAccountMeta<string> = string, TAccountSelfAuthority extends string | IAccountMeta<string> = string, TAccountProgram extends string | IAccountMeta<string> = 'DLv3NggMiSaef97YCkew5xKUHDh13tVGZ7tydt3ZeAru', TRemainingAccounts extends readonly IAccountMeta<string>[] = []> = IInstruction<TProgram> & IInstructionWithData<Uint8Array> & IInstructionWithAccounts<[
|
|
13
13
|
TAccountAuthorityPda extends string ? ReadonlySignerAccount<TAccountAuthorityPda> & IAccountSignerMeta<TAccountAuthorityPda> : TAccountAuthorityPda,
|
|
14
14
|
TAccountState extends string ? ReadonlyAccount<TAccountState> : TAccountState,
|
|
15
15
|
TAccountSelfAuthority extends string ? ReadonlyAccount<TAccountSelfAuthority> : TAccountSelfAuthority,
|
|
@@ -64,7 +64,7 @@ async function getHandleReceiveMessageInstructionAsync(input, config) {
|
|
|
64
64
|
// Resolve default values.
|
|
65
65
|
if (!accounts.authorityPda.value) {
|
|
66
66
|
accounts.authorityPda.value = await (0, kit_1.getProgramDerivedAddress)({
|
|
67
|
-
programAddress
|
|
67
|
+
programAddress,
|
|
68
68
|
seeds: [
|
|
69
69
|
(0, kit_1.getBytesEncoder)().encode(new Uint8Array([
|
|
70
70
|
109, 101, 115, 115, 97, 103, 101, 95, 116, 114, 97, 110, 115, 109,
|
|
@@ -72,9 +72,9 @@ async function getHandleReceiveMessageInstructionAsync(input, config) {
|
|
|
72
72
|
121,
|
|
73
73
|
])),
|
|
74
74
|
(0, kit_1.getBytesEncoder)().encode(new Uint8Array([
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
183, 102, 64, 134, 222, 55, 238, 112, 130, 28, 16, 68, 91, 22, 47,
|
|
76
|
+
44, 126, 200, 121, 91, 208, 128, 12, 20, 98, 148, 158, 35, 40, 209,
|
|
77
|
+
221, 90,
|
|
78
78
|
])),
|
|
79
79
|
],
|
|
80
80
|
});
|
|
@@ -91,7 +91,7 @@ async function getHandleReceiveMessageInstructionAsync(input, config) {
|
|
|
91
91
|
}
|
|
92
92
|
if (!accounts.program.value) {
|
|
93
93
|
accounts.program.value =
|
|
94
|
-
'
|
|
94
|
+
'DLv3NggMiSaef97YCkew5xKUHDh13tVGZ7tydt3ZeAru';
|
|
95
95
|
}
|
|
96
96
|
const getAccountMeta = (0, shared_1.getAccountMetaFactory)(programAddress, 'programId');
|
|
97
97
|
const instruction = {
|
|
@@ -122,7 +122,7 @@ function getHandleReceiveMessageInstruction(input, config) {
|
|
|
122
122
|
// Resolve default values.
|
|
123
123
|
if (!accounts.program.value) {
|
|
124
124
|
accounts.program.value =
|
|
125
|
-
'
|
|
125
|
+
'DLv3NggMiSaef97YCkew5xKUHDh13tVGZ7tydt3ZeAru';
|
|
126
126
|
}
|
|
127
127
|
const getAccountMeta = (0, shared_1.getAccountMetaFactory)(programAddress, 'programId');
|
|
128
128
|
const instruction = {
|
|
@@ -30,7 +30,7 @@ export type UnsafeDepositInstructionData = {
|
|
|
30
30
|
inputToken: Address;
|
|
31
31
|
outputToken: Address;
|
|
32
32
|
inputAmount: bigint;
|
|
33
|
-
outputAmount:
|
|
33
|
+
outputAmount: ReadonlyUint8Array;
|
|
34
34
|
destinationChainId: bigint;
|
|
35
35
|
exclusiveRelayer: Address;
|
|
36
36
|
depositNonce: bigint;
|
|
@@ -45,7 +45,7 @@ export type UnsafeDepositInstructionDataArgs = {
|
|
|
45
45
|
inputToken: Address;
|
|
46
46
|
outputToken: Address;
|
|
47
47
|
inputAmount: number | bigint;
|
|
48
|
-
outputAmount:
|
|
48
|
+
outputAmount: ReadonlyUint8Array;
|
|
49
49
|
destinationChainId: number | bigint;
|
|
50
50
|
exclusiveRelayer: Address;
|
|
51
51
|
depositNonce: number | bigint;
|
|
@@ -32,7 +32,7 @@ function getUnsafeDepositInstructionDataEncoder() {
|
|
|
32
32
|
['inputToken', (0, kit_1.getAddressEncoder)()],
|
|
33
33
|
['outputToken', (0, kit_1.getAddressEncoder)()],
|
|
34
34
|
['inputAmount', (0, kit_1.getU64Encoder)()],
|
|
35
|
-
['outputAmount', (0, kit_1.
|
|
35
|
+
['outputAmount', (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 32)],
|
|
36
36
|
['destinationChainId', (0, kit_1.getU64Encoder)()],
|
|
37
37
|
['exclusiveRelayer', (0, kit_1.getAddressEncoder)()],
|
|
38
38
|
['depositNonce', (0, kit_1.getU64Encoder)()],
|
|
@@ -50,7 +50,7 @@ function getUnsafeDepositInstructionDataDecoder() {
|
|
|
50
50
|
['inputToken', (0, kit_1.getAddressDecoder)()],
|
|
51
51
|
['outputToken', (0, kit_1.getAddressDecoder)()],
|
|
52
52
|
['inputAmount', (0, kit_1.getU64Decoder)()],
|
|
53
|
-
['outputAmount', (0, kit_1.
|
|
53
|
+
['outputAmount', (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 32)],
|
|
54
54
|
['destinationChainId', (0, kit_1.getU64Decoder)()],
|
|
55
55
|
['exclusiveRelayer', (0, kit_1.getAddressDecoder)()],
|
|
56
56
|
['depositNonce', (0, kit_1.getU64Decoder)()],
|
|
@@ -96,7 +96,7 @@ async function getUnsafeDepositInstructionAsync(input, config) {
|
|
|
96
96
|
}
|
|
97
97
|
if (!accounts.depositorTokenAccount.value) {
|
|
98
98
|
accounts.depositorTokenAccount.value = await (0, kit_1.getProgramDerivedAddress)({
|
|
99
|
-
programAddress
|
|
99
|
+
programAddress,
|
|
100
100
|
seeds: [
|
|
101
101
|
(0, kit_1.getAddressEncoder)().encode((0, shared_1.expectSome)(args.depositor)),
|
|
102
102
|
(0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.tokenProgram.value)),
|
|
@@ -106,7 +106,7 @@ async function getUnsafeDepositInstructionAsync(input, config) {
|
|
|
106
106
|
}
|
|
107
107
|
if (!accounts.vault.value) {
|
|
108
108
|
accounts.vault.value = await (0, kit_1.getProgramDerivedAddress)({
|
|
109
|
-
programAddress
|
|
109
|
+
programAddress,
|
|
110
110
|
seeds: [
|
|
111
111
|
(0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.state.value)),
|
|
112
112
|
(0, kit_1.getAddressEncoder)().encode((0, shared_1.expectAddress)(accounts.tokenProgram.value)),
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { type Address, type ReadonlyUint8Array } from '@solana/kit';
|
|
9
9
|
import { type ParsedBridgeTokensToHubPoolInstruction, type ParsedClaimRelayerRefundInstruction, type ParsedCloseClaimAccountInstruction, type ParsedCloseFillPdaInstruction, type ParsedCloseInstructionParamsInstruction, type ParsedCreateTokenAccountsInstruction, type ParsedDepositInstruction, type ParsedDepositNowInstruction, type ParsedEmergencyDeleteRootBundleInstruction, type ParsedExecuteRelayerRefundLeafDeferredInstruction, type ParsedExecuteRelayerRefundLeafInstruction, type ParsedExecuteSlowRelayLeafInstruction, type ParsedFillRelayInstruction, type ParsedGetUnsafeDepositIdInstruction, type ParsedHandleReceiveMessageInstruction, type ParsedInitializeClaimAccountInstruction, type ParsedInitializeInstruction, type ParsedInitializeInstructionParamsInstruction, type ParsedPauseDepositsInstruction, type ParsedPauseFillsInstruction, type ParsedRelayRootBundleInstruction, type ParsedRequestSlowFillInstruction, type ParsedSetCrossDomainAdminInstruction, type ParsedSetCurrentTimeInstruction, type ParsedTransferOwnershipInstruction, type ParsedUnsafeDepositInstruction, type ParsedWriteInstructionParamsFragmentInstruction } from '../instructions';
|
|
10
|
-
export declare const SVM_SPOKE_PROGRAM_ADDRESS: Address<"
|
|
10
|
+
export declare const SVM_SPOKE_PROGRAM_ADDRESS: Address<"DLv3NggMiSaef97YCkew5xKUHDh13tVGZ7tydt3ZeAru">;
|
|
11
11
|
export declare enum SvmSpokeAccount {
|
|
12
12
|
ClaimAccount = 0,
|
|
13
13
|
ExecuteRelayerRefundLeafParams = 1,
|
|
@@ -54,7 +54,7 @@ export declare enum SvmSpokeInstruction {
|
|
|
54
54
|
export declare function identifySvmSpokeInstruction(instruction: {
|
|
55
55
|
data: ReadonlyUint8Array;
|
|
56
56
|
} | ReadonlyUint8Array): SvmSpokeInstruction;
|
|
57
|
-
export type ParsedSvmSpokeInstruction<TProgram extends string = '
|
|
57
|
+
export type ParsedSvmSpokeInstruction<TProgram extends string = 'DLv3NggMiSaef97YCkew5xKUHDh13tVGZ7tydt3ZeAru'> = ({
|
|
58
58
|
instructionType: SvmSpokeInstruction.BridgeTokensToHubPool;
|
|
59
59
|
} & ParsedBridgeTokensToHubPoolInstruction<TProgram>) | ({
|
|
60
60
|
instructionType: SvmSpokeInstruction.ClaimRelayerRefund;
|
|
@@ -11,7 +11,7 @@ exports.SvmSpokeInstruction = exports.SvmSpokeAccount = exports.SVM_SPOKE_PROGRA
|
|
|
11
11
|
exports.identifySvmSpokeAccount = identifySvmSpokeAccount;
|
|
12
12
|
exports.identifySvmSpokeInstruction = identifySvmSpokeInstruction;
|
|
13
13
|
const kit_1 = require("@solana/kit");
|
|
14
|
-
exports.SVM_SPOKE_PROGRAM_ADDRESS = '
|
|
14
|
+
exports.SVM_SPOKE_PROGRAM_ADDRESS = 'DLv3NggMiSaef97YCkew5xKUHDh13tVGZ7tydt3ZeAru';
|
|
15
15
|
var SvmSpokeAccount;
|
|
16
16
|
(function (SvmSpokeAccount) {
|
|
17
17
|
SvmSpokeAccount[SvmSpokeAccount["ClaimAccount"] = 0] = "ClaimAccount";
|
|
@@ -10,7 +10,7 @@ import { type RelayExecutionEventInfo, type RelayExecutionEventInfoArgs } from '
|
|
|
10
10
|
export type FilledRelay = {
|
|
11
11
|
inputToken: Address;
|
|
12
12
|
outputToken: Address;
|
|
13
|
-
inputAmount:
|
|
13
|
+
inputAmount: ReadonlyUint8Array;
|
|
14
14
|
outputAmount: bigint;
|
|
15
15
|
repaymentChainId: bigint;
|
|
16
16
|
originChainId: bigint;
|
|
@@ -27,7 +27,7 @@ export type FilledRelay = {
|
|
|
27
27
|
export type FilledRelayArgs = {
|
|
28
28
|
inputToken: Address;
|
|
29
29
|
outputToken: Address;
|
|
30
|
-
inputAmount:
|
|
30
|
+
inputAmount: ReadonlyUint8Array;
|
|
31
31
|
outputAmount: number | bigint;
|
|
32
32
|
repaymentChainId: number | bigint;
|
|
33
33
|
originChainId: number | bigint;
|
|
@@ -16,7 +16,7 @@ function getFilledRelayEncoder() {
|
|
|
16
16
|
return (0, kit_1.getStructEncoder)([
|
|
17
17
|
['inputToken', (0, kit_1.getAddressEncoder)()],
|
|
18
18
|
['outputToken', (0, kit_1.getAddressEncoder)()],
|
|
19
|
-
['inputAmount', (0, kit_1.
|
|
19
|
+
['inputAmount', (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 32)],
|
|
20
20
|
['outputAmount', (0, kit_1.getU64Encoder)()],
|
|
21
21
|
['repaymentChainId', (0, kit_1.getU64Encoder)()],
|
|
22
22
|
['originChainId', (0, kit_1.getU64Encoder)()],
|
|
@@ -35,7 +35,7 @@ function getFilledRelayDecoder() {
|
|
|
35
35
|
return (0, kit_1.getStructDecoder)([
|
|
36
36
|
['inputToken', (0, kit_1.getAddressDecoder)()],
|
|
37
37
|
['outputToken', (0, kit_1.getAddressDecoder)()],
|
|
38
|
-
['inputAmount', (0, kit_1.
|
|
38
|
+
['inputAmount', (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 32)],
|
|
39
39
|
['outputAmount', (0, kit_1.getU64Decoder)()],
|
|
40
40
|
['repaymentChainId', (0, kit_1.getU64Decoder)()],
|
|
41
41
|
['originChainId', (0, kit_1.getU64Decoder)()],
|
|
@@ -10,7 +10,7 @@ export type FundsDeposited = {
|
|
|
10
10
|
inputToken: Address;
|
|
11
11
|
outputToken: Address;
|
|
12
12
|
inputAmount: bigint;
|
|
13
|
-
outputAmount:
|
|
13
|
+
outputAmount: ReadonlyUint8Array;
|
|
14
14
|
destinationChainId: bigint;
|
|
15
15
|
depositId: ReadonlyUint8Array;
|
|
16
16
|
quoteTimestamp: number;
|
|
@@ -25,7 +25,7 @@ export type FundsDepositedArgs = {
|
|
|
25
25
|
inputToken: Address;
|
|
26
26
|
outputToken: Address;
|
|
27
27
|
inputAmount: number | bigint;
|
|
28
|
-
outputAmount:
|
|
28
|
+
outputAmount: ReadonlyUint8Array;
|
|
29
29
|
destinationChainId: number | bigint;
|
|
30
30
|
depositId: ReadonlyUint8Array;
|
|
31
31
|
quoteTimestamp: number;
|
|
@@ -16,7 +16,7 @@ function getFundsDepositedEncoder() {
|
|
|
16
16
|
['inputToken', (0, kit_1.getAddressEncoder)()],
|
|
17
17
|
['outputToken', (0, kit_1.getAddressEncoder)()],
|
|
18
18
|
['inputAmount', (0, kit_1.getU64Encoder)()],
|
|
19
|
-
['outputAmount', (0, kit_1.
|
|
19
|
+
['outputAmount', (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 32)],
|
|
20
20
|
['destinationChainId', (0, kit_1.getU64Encoder)()],
|
|
21
21
|
['depositId', (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 32)],
|
|
22
22
|
['quoteTimestamp', (0, kit_1.getU32Encoder)()],
|
|
@@ -33,7 +33,7 @@ function getFundsDepositedDecoder() {
|
|
|
33
33
|
['inputToken', (0, kit_1.getAddressDecoder)()],
|
|
34
34
|
['outputToken', (0, kit_1.getAddressDecoder)()],
|
|
35
35
|
['inputAmount', (0, kit_1.getU64Decoder)()],
|
|
36
|
-
['outputAmount', (0, kit_1.
|
|
36
|
+
['outputAmount', (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 32)],
|
|
37
37
|
['destinationChainId', (0, kit_1.getU64Decoder)()],
|
|
38
38
|
['depositId', (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 32)],
|
|
39
39
|
['quoteTimestamp', (0, kit_1.getU32Decoder)()],
|
|
@@ -12,7 +12,7 @@ export type RelayData = {
|
|
|
12
12
|
exclusiveRelayer: Address;
|
|
13
13
|
inputToken: Address;
|
|
14
14
|
outputToken: Address;
|
|
15
|
-
inputAmount:
|
|
15
|
+
inputAmount: ReadonlyUint8Array;
|
|
16
16
|
outputAmount: bigint;
|
|
17
17
|
originChainId: bigint;
|
|
18
18
|
depositId: ReadonlyUint8Array;
|
|
@@ -26,7 +26,7 @@ export type RelayDataArgs = {
|
|
|
26
26
|
exclusiveRelayer: Address;
|
|
27
27
|
inputToken: Address;
|
|
28
28
|
outputToken: Address;
|
|
29
|
-
inputAmount:
|
|
29
|
+
inputAmount: ReadonlyUint8Array;
|
|
30
30
|
outputAmount: number | bigint;
|
|
31
31
|
originChainId: number | bigint;
|
|
32
32
|
depositId: ReadonlyUint8Array;
|
|
@@ -18,7 +18,7 @@ function getRelayDataEncoder() {
|
|
|
18
18
|
['exclusiveRelayer', (0, kit_1.getAddressEncoder)()],
|
|
19
19
|
['inputToken', (0, kit_1.getAddressEncoder)()],
|
|
20
20
|
['outputToken', (0, kit_1.getAddressEncoder)()],
|
|
21
|
-
['inputAmount', (0, kit_1.
|
|
21
|
+
['inputAmount', (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 32)],
|
|
22
22
|
['outputAmount', (0, kit_1.getU64Encoder)()],
|
|
23
23
|
['originChainId', (0, kit_1.getU64Encoder)()],
|
|
24
24
|
['depositId', (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 32)],
|
|
@@ -34,7 +34,7 @@ function getRelayDataDecoder() {
|
|
|
34
34
|
['exclusiveRelayer', (0, kit_1.getAddressDecoder)()],
|
|
35
35
|
['inputToken', (0, kit_1.getAddressDecoder)()],
|
|
36
36
|
['outputToken', (0, kit_1.getAddressDecoder)()],
|
|
37
|
-
['inputAmount', (0, kit_1.
|
|
37
|
+
['inputAmount', (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 32)],
|
|
38
38
|
['outputAmount', (0, kit_1.getU64Decoder)()],
|
|
39
39
|
['originChainId', (0, kit_1.getU64Decoder)()],
|
|
40
40
|
['depositId', (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 32)],
|
|
@@ -9,7 +9,7 @@ import { type Address, type Codec, type Decoder, type Encoder, type ReadonlyUint
|
|
|
9
9
|
export type RequestedSlowFill = {
|
|
10
10
|
inputToken: Address;
|
|
11
11
|
outputToken: Address;
|
|
12
|
-
inputAmount:
|
|
12
|
+
inputAmount: ReadonlyUint8Array;
|
|
13
13
|
outputAmount: bigint;
|
|
14
14
|
originChainId: bigint;
|
|
15
15
|
depositId: ReadonlyUint8Array;
|
|
@@ -23,7 +23,7 @@ export type RequestedSlowFill = {
|
|
|
23
23
|
export type RequestedSlowFillArgs = {
|
|
24
24
|
inputToken: Address;
|
|
25
25
|
outputToken: Address;
|
|
26
|
-
inputAmount:
|
|
26
|
+
inputAmount: ReadonlyUint8Array;
|
|
27
27
|
outputAmount: number | bigint;
|
|
28
28
|
originChainId: number | bigint;
|
|
29
29
|
depositId: ReadonlyUint8Array;
|
|
@@ -15,7 +15,7 @@ function getRequestedSlowFillEncoder() {
|
|
|
15
15
|
return (0, kit_1.getStructEncoder)([
|
|
16
16
|
['inputToken', (0, kit_1.getAddressEncoder)()],
|
|
17
17
|
['outputToken', (0, kit_1.getAddressEncoder)()],
|
|
18
|
-
['inputAmount', (0, kit_1.
|
|
18
|
+
['inputAmount', (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 32)],
|
|
19
19
|
['outputAmount', (0, kit_1.getU64Encoder)()],
|
|
20
20
|
['originChainId', (0, kit_1.getU64Encoder)()],
|
|
21
21
|
['depositId', (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 32)],
|
|
@@ -31,7 +31,7 @@ function getRequestedSlowFillDecoder() {
|
|
|
31
31
|
return (0, kit_1.getStructDecoder)([
|
|
32
32
|
['inputToken', (0, kit_1.getAddressDecoder)()],
|
|
33
33
|
['outputToken', (0, kit_1.getAddressDecoder)()],
|
|
34
|
-
['inputAmount', (0, kit_1.
|
|
34
|
+
['inputAmount', (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 32)],
|
|
35
35
|
['outputAmount', (0, kit_1.getU64Decoder)()],
|
|
36
36
|
['originChainId', (0, kit_1.getU64Decoder)()],
|
|
37
37
|
['depositId', (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 32)],
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import * as MulticallHandlerClient from "./MulticallHandler";
|
|
2
2
|
import * as SvmSpokeClient from "./SvmSpoke";
|
|
3
|
-
|
|
4
|
-
import * as TokenMessengerMinterClient from "./TokenMessengerMinter";
|
|
5
|
-
export { MulticallHandlerClient, SvmSpokeClient, MessageTransmitterClient, TokenMessengerMinterClient };
|
|
3
|
+
export { MulticallHandlerClient, SvmSpokeClient };
|
|
@@ -23,12 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
26
|
+
exports.SvmSpokeClient = exports.MulticallHandlerClient = void 0;
|
|
27
27
|
const MulticallHandlerClient = __importStar(require("./MulticallHandler"));
|
|
28
28
|
exports.MulticallHandlerClient = MulticallHandlerClient;
|
|
29
29
|
const SvmSpokeClient = __importStar(require("./SvmSpoke"));
|
|
30
30
|
exports.SvmSpokeClient = SvmSpokeClient;
|
|
31
|
-
const MessageTransmitterClient = __importStar(require("./MessageTransmitter"));
|
|
32
|
-
exports.MessageTransmitterClient = MessageTransmitterClient;
|
|
33
|
-
const TokenMessengerMinterClient = __importStar(require("./TokenMessengerMinter"));
|
|
34
|
-
exports.TokenMessengerMinterClient = TokenMessengerMinterClient;
|
|
@@ -18,7 +18,7 @@ export declare class DepositSeedData {
|
|
|
18
18
|
inputToken: Uint8Array;
|
|
19
19
|
outputToken: Uint8Array;
|
|
20
20
|
inputAmount: BN;
|
|
21
|
-
outputAmount:
|
|
21
|
+
outputAmount: number[];
|
|
22
22
|
destinationChainId: BN;
|
|
23
23
|
exclusiveRelayer: Uint8Array;
|
|
24
24
|
quoteTimestamp: BN;
|
|
@@ -31,7 +31,7 @@ export declare class DepositSeedData {
|
|
|
31
31
|
inputToken: Uint8Array;
|
|
32
32
|
outputToken: Uint8Array;
|
|
33
33
|
inputAmount: BN;
|
|
34
|
-
outputAmount:
|
|
34
|
+
outputAmount: number[];
|
|
35
35
|
destinationChainId: BN;
|
|
36
36
|
exclusiveRelayer: Uint8Array;
|
|
37
37
|
quoteTimestamp: BN;
|
|
@@ -49,7 +49,7 @@ export declare function getDepositSeedHash(depositData: {
|
|
|
49
49
|
inputToken: PublicKey;
|
|
50
50
|
outputToken: PublicKey;
|
|
51
51
|
inputAmount: BN;
|
|
52
|
-
outputAmount:
|
|
52
|
+
outputAmount: number[];
|
|
53
53
|
destinationChainId: BN;
|
|
54
54
|
exclusiveRelayer: PublicKey;
|
|
55
55
|
quoteTimestamp: BN;
|
|
@@ -70,7 +70,7 @@ export declare class DepositNowSeedData {
|
|
|
70
70
|
inputToken: Uint8Array;
|
|
71
71
|
outputToken: Uint8Array;
|
|
72
72
|
inputAmount: BN;
|
|
73
|
-
outputAmount:
|
|
73
|
+
outputAmount: number[];
|
|
74
74
|
destinationChainId: BN;
|
|
75
75
|
exclusiveRelayer: Uint8Array;
|
|
76
76
|
fillDeadlineOffset: BN;
|
|
@@ -82,7 +82,7 @@ export declare class DepositNowSeedData {
|
|
|
82
82
|
inputToken: Uint8Array;
|
|
83
83
|
outputToken: Uint8Array;
|
|
84
84
|
inputAmount: BN;
|
|
85
|
-
outputAmount:
|
|
85
|
+
outputAmount: number[];
|
|
86
86
|
destinationChainId: BN;
|
|
87
87
|
exclusiveRelayer: Uint8Array;
|
|
88
88
|
fillDeadlineOffset: BN;
|
|
@@ -99,7 +99,7 @@ export declare function getDepositNowSeedHash(depositData: {
|
|
|
99
99
|
inputToken: PublicKey;
|
|
100
100
|
outputToken: PublicKey;
|
|
101
101
|
inputAmount: BN;
|
|
102
|
-
outputAmount:
|
|
102
|
+
outputAmount: number[];
|
|
103
103
|
destinationChainId: BN;
|
|
104
104
|
exclusiveRelayer: PublicKey;
|
|
105
105
|
fillDeadlineOffset: BN;
|
|
@@ -60,7 +60,7 @@ const depositSeedSchema = new Map([
|
|
|
60
60
|
["inputToken", [32]],
|
|
61
61
|
["outputToken", [32]],
|
|
62
62
|
["inputAmount", "u64"],
|
|
63
|
-
["outputAmount",
|
|
63
|
+
["outputAmount", [32]],
|
|
64
64
|
["destinationChainId", "u64"],
|
|
65
65
|
["exclusiveRelayer", [32]],
|
|
66
66
|
["quoteTimestamp", "u32"],
|
|
@@ -119,7 +119,7 @@ const depositNowSeedSchema = new Map([
|
|
|
119
119
|
["inputToken", [32]],
|
|
120
120
|
["outputToken", [32]],
|
|
121
121
|
["inputAmount", "u64"],
|
|
122
|
-
["outputAmount",
|
|
122
|
+
["outputAmount", [32]],
|
|
123
123
|
["destinationChainId", "u64"],
|
|
124
124
|
["exclusiveRelayer", [32]],
|
|
125
125
|
["fillDeadlineOffset", "u32"],
|
|
@@ -19,7 +19,7 @@ function calculateRelayHashUint8Array(relayData, chainId) {
|
|
|
19
19
|
relayData.exclusiveRelayer.toBuffer(),
|
|
20
20
|
relayData.inputToken.toBuffer(),
|
|
21
21
|
relayData.outputToken.toBuffer(),
|
|
22
|
-
relayData.inputAmount
|
|
22
|
+
Buffer.from(relayData.inputAmount),
|
|
23
23
|
relayData.outputAmount.toArrayLike(Buffer, "le", 8),
|
|
24
24
|
relayData.originChainId.toArrayLike(Buffer, "le", 8),
|
|
25
25
|
Buffer.from(relayData.depositId),
|
|
@@ -42,7 +42,7 @@ function calculateRelayEventHashUint8Array(relayEventData, chainId) {
|
|
|
42
42
|
relayEventData.exclusiveRelayer.toBuffer(),
|
|
43
43
|
relayEventData.inputToken.toBuffer(),
|
|
44
44
|
relayEventData.outputToken.toBuffer(),
|
|
45
|
-
relayEventData.inputAmount
|
|
45
|
+
Buffer.from(relayEventData.inputAmount),
|
|
46
46
|
relayEventData.outputAmount.toArrayLike(Buffer, "le", 8),
|
|
47
47
|
relayEventData.originChainId.toArrayLike(Buffer, "le", 8),
|
|
48
48
|
Buffer.from(relayEventData.depositId),
|
|
@@ -169,7 +169,7 @@ const slowFillDataSchema = new Map([
|
|
|
169
169
|
["exclusiveRelayer", [32]],
|
|
170
170
|
["inputToken", [32]],
|
|
171
171
|
["outputToken", [32]],
|
|
172
|
-
["inputAmount",
|
|
172
|
+
["inputAmount", [32]],
|
|
173
173
|
["outputAmount", "u64"],
|
|
174
174
|
["originChainId", "u64"],
|
|
175
175
|
["depositId", [32]],
|
|
@@ -178,7 +178,7 @@ function parseDepositId(value) {
|
|
|
178
178
|
/**
|
|
179
179
|
* Stringifies a CPI event.
|
|
180
180
|
*/
|
|
181
|
-
function stringifyCpiEvent(obj) {
|
|
181
|
+
function stringifyCpiEvent(obj, eventName) {
|
|
182
182
|
if (obj?.constructor?.toString()?.includes("PublicKey")) {
|
|
183
183
|
if (obj.toString().startsWith("111111111111")) {
|
|
184
184
|
// First 12 bytes are 0 for EVM addresses.
|
|
@@ -196,16 +196,26 @@ function stringifyCpiEvent(obj) {
|
|
|
196
196
|
return Buffer.from(obj).toString("hex"); // Hex representation for fixed-length arrays
|
|
197
197
|
}
|
|
198
198
|
else if (Array.isArray(obj)) {
|
|
199
|
-
return obj.map(stringifyCpiEvent);
|
|
199
|
+
return obj.map((obj) => stringifyCpiEvent(obj, eventName));
|
|
200
200
|
}
|
|
201
201
|
else if (obj !== null && typeof obj === "object") {
|
|
202
202
|
return Object.fromEntries(Object.entries(obj).map(([key, value]) => {
|
|
203
|
-
if (
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
203
|
+
if (Array.isArray(value) && value.length === 32) {
|
|
204
|
+
if (key === "depositId" || key === "deposit_id") {
|
|
205
|
+
// Parse depositId using the helper function
|
|
206
|
+
const parsedValue = parseDepositId(new Uint8Array(value));
|
|
207
|
+
return [key, parsedValue];
|
|
208
|
+
}
|
|
209
|
+
else if (eventName.toLowerCase() === "fundsdeposited" &&
|
|
210
|
+
(key === "outputAmount" || key === "output_amount")) {
|
|
211
|
+
return [key, (0, conversionUtils_1.u8Array32ToInt)(new Uint8Array(value)).toString()];
|
|
212
|
+
}
|
|
213
|
+
else if ((eventName.toLowerCase() === "filledrelay" || eventName.toLowerCase() === "requestedslowfill") &&
|
|
214
|
+
(key === "inputAmount" || key === "input_amount")) {
|
|
215
|
+
return [key, (0, conversionUtils_1.u8Array32ToInt)(new Uint8Array(value)).toString()];
|
|
216
|
+
}
|
|
207
217
|
}
|
|
208
|
-
return [key, stringifyCpiEvent(value)];
|
|
218
|
+
return [key, stringifyCpiEvent(value, eventName)];
|
|
209
219
|
}));
|
|
210
220
|
}
|
|
211
221
|
return obj;
|
package/dist/src/types/svm.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export type RelayData = {
|
|
|
40
40
|
exclusiveRelayer: PublicKey;
|
|
41
41
|
inputToken: PublicKey;
|
|
42
42
|
outputToken: PublicKey;
|
|
43
|
-
inputAmount:
|
|
43
|
+
inputAmount: number[];
|
|
44
44
|
outputAmount: BN;
|
|
45
45
|
originChainId: BN;
|
|
46
46
|
depositId: number[];
|
|
@@ -57,7 +57,7 @@ export interface DepositData {
|
|
|
57
57
|
inputToken: PublicKey | null;
|
|
58
58
|
outputToken: PublicKey;
|
|
59
59
|
inputAmount: BN;
|
|
60
|
-
outputAmount:
|
|
60
|
+
outputAmount: number[];
|
|
61
61
|
destinationChainId: BN;
|
|
62
62
|
exclusiveRelayer: PublicKey;
|
|
63
63
|
quoteTimestamp: BN;
|
|
@@ -71,7 +71,7 @@ export type DepositDataValues = [
|
|
|
71
71
|
PublicKey,
|
|
72
72
|
PublicKey,
|
|
73
73
|
BN,
|
|
74
|
-
|
|
74
|
+
number[],
|
|
75
75
|
BN,
|
|
76
76
|
PublicKey,
|
|
77
77
|
number,
|