@relay-protocol/settlement-sdk 0.0.64
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 +3 -0
- package/dist/hub/hub-utils.d.ts +29 -0
- package/dist/hub/hub-utils.js +35 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +45 -0
- package/dist/messages/common/solana-vm/idls/RelayDepositoryIdl.d.ts +383 -0
- package/dist/messages/common/solana-vm/idls/RelayDepositoryIdl.js +901 -0
- package/dist/messages/v2.1/depository-deposit.d.ts +16 -0
- package/dist/messages/v2.1/depository-deposit.js +44 -0
- package/dist/messages/v2.1/depository-withdrawal.d.ts +103 -0
- package/dist/messages/v2.1/depository-withdrawal.js +661 -0
- package/dist/messages/v2.1/solver-fill.d.ts +26 -0
- package/dist/messages/v2.1/solver-fill.js +61 -0
- package/dist/messages/v2.1/solver-refund.d.ts +28 -0
- package/dist/messages/v2.1/solver-refund.js +67 -0
- package/dist/messages/v2.2/execution.d.ts +48 -0
- package/dist/messages/v2.2/execution.js +135 -0
- package/dist/messages/v2.2/withdrawal-execution.d.ts +55 -0
- package/dist/messages/v2.2/withdrawal-execution.js +71 -0
- package/dist/order/index.d.ts +140 -0
- package/dist/order/index.js +230 -0
- package/dist/utils.d.ts +9 -0
- package/dist/utils.js +255 -0
- package/package.json +39 -0
package/README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { VmType } from "../utils";
|
|
2
|
+
export interface TokenIdComponents {
|
|
3
|
+
family: VmType;
|
|
4
|
+
chainId: bigint;
|
|
5
|
+
address: string;
|
|
6
|
+
}
|
|
7
|
+
export interface VirtualAddressComponents {
|
|
8
|
+
family: VmType;
|
|
9
|
+
chainId: bigint;
|
|
10
|
+
address: string;
|
|
11
|
+
}
|
|
12
|
+
export type TokenId = bigint;
|
|
13
|
+
export type VirtualAddress = `0x${string}`;
|
|
14
|
+
export declare const getCheckSummedAddress: (family: string, address: string) => string;
|
|
15
|
+
/**
|
|
16
|
+
* Generates a virtual Ethereum address from token components
|
|
17
|
+
* @param components The token components (family, chainId, address)
|
|
18
|
+
* @returns A checksummed Ethereum address derived from the token ID
|
|
19
|
+
* @remarks This function first generates a token ID using the components,
|
|
20
|
+
* then converts the last 20 bytes of the hash to an Ethereum address.
|
|
21
|
+
* This is equivalent to the Solidity: address(uint160(uint256(addressHash)))
|
|
22
|
+
*/
|
|
23
|
+
export declare function generateAddress(components: VirtualAddressComponents): VirtualAddress;
|
|
24
|
+
/**
|
|
25
|
+
* Generates a token ID based on the chain type, chain ID, and address
|
|
26
|
+
* @param components The token components (family, chainId, address)
|
|
27
|
+
* @returns The keccak256 hash of the token components
|
|
28
|
+
*/
|
|
29
|
+
export declare function generateTokenId(components: TokenIdComponents): TokenId;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCheckSummedAddress = void 0;
|
|
4
|
+
exports.generateAddress = generateAddress;
|
|
5
|
+
exports.generateTokenId = generateTokenId;
|
|
6
|
+
const viem_1 = require("viem");
|
|
7
|
+
const getCheckSummedAddress = (family, address) => {
|
|
8
|
+
const checksummedAddress = family === "ethereum-vm" ? (0, viem_1.getAddress)(address) : address;
|
|
9
|
+
return checksummedAddress;
|
|
10
|
+
};
|
|
11
|
+
exports.getCheckSummedAddress = getCheckSummedAddress;
|
|
12
|
+
/**
|
|
13
|
+
* Generates a virtual Ethereum address from token components
|
|
14
|
+
* @param components The token components (family, chainId, address)
|
|
15
|
+
* @returns A checksummed Ethereum address derived from the token ID
|
|
16
|
+
* @remarks This function first generates a token ID using the components,
|
|
17
|
+
* then converts the last 20 bytes of the hash to an Ethereum address.
|
|
18
|
+
* This is equivalent to the Solidity: address(uint160(uint256(addressHash)))
|
|
19
|
+
*/
|
|
20
|
+
function generateAddress(components) {
|
|
21
|
+
const { chainId, address, family } = components;
|
|
22
|
+
const addressHash = (0, viem_1.keccak256)((0, viem_1.encodePacked)(["string", "uint256", family === "ethereum-vm" ? "address" : "string"], [family, chainId, (0, exports.getCheckSummedAddress)(family, address)]));
|
|
23
|
+
const addressBytes = addressHash.slice(2).slice(-40);
|
|
24
|
+
return (0, viem_1.getAddress)("0x" + addressBytes);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Generates a token ID based on the chain type, chain ID, and address
|
|
28
|
+
* @param components The token components (family, chainId, address)
|
|
29
|
+
* @returns The keccak256 hash of the token components
|
|
30
|
+
*/
|
|
31
|
+
function generateTokenId(components) {
|
|
32
|
+
const { family, chainId, address } = components;
|
|
33
|
+
const packedData = (0, viem_1.encodePacked)(["string", "uint256", family === "ethereum-vm" ? "address" : "string"], [family, chainId, (0, exports.getCheckSummedAddress)(family, address)]);
|
|
34
|
+
return BigInt((0, viem_1.keccak256)(packedData));
|
|
35
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Order, encodeOrderCall, decodeOrderCall, encodeOrderExtraData, decodeOrderExtraData, getOrderId } from "./order";
|
|
2
|
+
import { DepositoryDepositMessage, getDepositoryDepositMessageId } from "./messages/v2.1/depository-deposit";
|
|
3
|
+
import { DecodedBitcoinVmWithdrawal, DecodedEthereumVmWithdrawal, DecodedSolanaVmWithdrawal, DecodedSuiVmWithdrawal, DecodedHyperliquidVmWithdrawal, DepositoryWithdrawalMessage, DepositoryWithdrawalStatus, getDepositoryWithdrawalMessageId, encodeWithdrawal, decodeWithdrawal, getDecodedWithdrawalId, getDecodedWithdrawalCurrency, getDecodedWithdrawalAmount, getDecodedWithdrawalRecipient } from "./messages/v2.1/depository-withdrawal";
|
|
4
|
+
import { SolverRefundMessage, SolverRefundStatus, getSolverRefundMessageId } from "./messages/v2.1/solver-refund";
|
|
5
|
+
import { SolverFillMessage, SolverFillStatus, getSolverFillMessageId } from "./messages/v2.1/solver-fill";
|
|
6
|
+
import { ActionType, ExecutionMessage, ExecutionMessageMetadata, getExecutionMessageId, encodeAction, decodeAction } from "./messages/v2.2/execution";
|
|
7
|
+
import { VmType, decodeAddress, decodeTransactionId, encodeAddress, encodeBytes, encodeTransactionId, getVmTypeNativeCurrency } from "./utils";
|
|
8
|
+
import { SubmitWithdrawRequest, getSubmitWithdrawRequestHash, getWithdrawalAddress, WithdrawalAddressParams, WithdrawalInitiationMessage, WithdrawalInitiatedMessage, WithdrawalAddressRequest } from "./messages/v2.2/withdrawal-execution";
|
|
9
|
+
import { TokenIdComponents, VirtualAddressComponents, TokenId, VirtualAddress, getCheckSummedAddress, generateAddress, generateTokenId } from "./hub/hub-utils";
|
|
10
|
+
export { Order, encodeOrderCall, decodeOrderCall, encodeOrderExtraData, decodeOrderExtraData, getOrderId, VmType, decodeAddress, decodeTransactionId, encodeAddress, encodeBytes, encodeTransactionId, getVmTypeNativeCurrency, DepositoryDepositMessage, getDepositoryDepositMessageId, DecodedBitcoinVmWithdrawal, DecodedEthereumVmWithdrawal, DecodedSolanaVmWithdrawal, DecodedSuiVmWithdrawal, DecodedHyperliquidVmWithdrawal, DepositoryWithdrawalMessage, DepositoryWithdrawalStatus, getDepositoryWithdrawalMessageId, encodeWithdrawal, decodeWithdrawal, getDecodedWithdrawalId, getDecodedWithdrawalCurrency, getDecodedWithdrawalAmount, getDecodedWithdrawalRecipient, SolverRefundMessage, SolverRefundStatus, getSolverRefundMessageId, SolverFillMessage, SolverFillStatus, getSolverFillMessageId, ExecutionMessage, ExecutionMessageMetadata, ActionType, getExecutionMessageId, encodeAction, decodeAction, TokenIdComponents, VirtualAddressComponents, TokenId, VirtualAddress, getCheckSummedAddress, generateAddress, generateTokenId, SubmitWithdrawRequest, getSubmitWithdrawRequestHash, getWithdrawalAddress, WithdrawalAddressParams, WithdrawalInitiationMessage, WithdrawalInitiatedMessage, WithdrawalAddressRequest, };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWithdrawalAddress = exports.getSubmitWithdrawRequestHash = exports.generateTokenId = exports.generateAddress = exports.getCheckSummedAddress = exports.decodeAction = exports.encodeAction = exports.getExecutionMessageId = exports.ActionType = exports.getSolverFillMessageId = exports.SolverFillStatus = exports.getSolverRefundMessageId = exports.SolverRefundStatus = exports.getDecodedWithdrawalRecipient = exports.getDecodedWithdrawalAmount = exports.getDecodedWithdrawalCurrency = exports.getDecodedWithdrawalId = exports.decodeWithdrawal = exports.encodeWithdrawal = exports.getDepositoryWithdrawalMessageId = exports.DepositoryWithdrawalStatus = exports.getDepositoryDepositMessageId = exports.getVmTypeNativeCurrency = exports.encodeTransactionId = exports.encodeBytes = exports.encodeAddress = exports.decodeTransactionId = exports.decodeAddress = exports.getOrderId = exports.decodeOrderExtraData = exports.encodeOrderExtraData = exports.decodeOrderCall = exports.encodeOrderCall = void 0;
|
|
4
|
+
const order_1 = require("./order");
|
|
5
|
+
Object.defineProperty(exports, "encodeOrderCall", { enumerable: true, get: function () { return order_1.encodeOrderCall; } });
|
|
6
|
+
Object.defineProperty(exports, "decodeOrderCall", { enumerable: true, get: function () { return order_1.decodeOrderCall; } });
|
|
7
|
+
Object.defineProperty(exports, "encodeOrderExtraData", { enumerable: true, get: function () { return order_1.encodeOrderExtraData; } });
|
|
8
|
+
Object.defineProperty(exports, "decodeOrderExtraData", { enumerable: true, get: function () { return order_1.decodeOrderExtraData; } });
|
|
9
|
+
Object.defineProperty(exports, "getOrderId", { enumerable: true, get: function () { return order_1.getOrderId; } });
|
|
10
|
+
const depository_deposit_1 = require("./messages/v2.1/depository-deposit");
|
|
11
|
+
Object.defineProperty(exports, "getDepositoryDepositMessageId", { enumerable: true, get: function () { return depository_deposit_1.getDepositoryDepositMessageId; } });
|
|
12
|
+
const depository_withdrawal_1 = require("./messages/v2.1/depository-withdrawal");
|
|
13
|
+
Object.defineProperty(exports, "DepositoryWithdrawalStatus", { enumerable: true, get: function () { return depository_withdrawal_1.DepositoryWithdrawalStatus; } });
|
|
14
|
+
Object.defineProperty(exports, "getDepositoryWithdrawalMessageId", { enumerable: true, get: function () { return depository_withdrawal_1.getDepositoryWithdrawalMessageId; } });
|
|
15
|
+
Object.defineProperty(exports, "encodeWithdrawal", { enumerable: true, get: function () { return depository_withdrawal_1.encodeWithdrawal; } });
|
|
16
|
+
Object.defineProperty(exports, "decodeWithdrawal", { enumerable: true, get: function () { return depository_withdrawal_1.decodeWithdrawal; } });
|
|
17
|
+
Object.defineProperty(exports, "getDecodedWithdrawalId", { enumerable: true, get: function () { return depository_withdrawal_1.getDecodedWithdrawalId; } });
|
|
18
|
+
Object.defineProperty(exports, "getDecodedWithdrawalCurrency", { enumerable: true, get: function () { return depository_withdrawal_1.getDecodedWithdrawalCurrency; } });
|
|
19
|
+
Object.defineProperty(exports, "getDecodedWithdrawalAmount", { enumerable: true, get: function () { return depository_withdrawal_1.getDecodedWithdrawalAmount; } });
|
|
20
|
+
Object.defineProperty(exports, "getDecodedWithdrawalRecipient", { enumerable: true, get: function () { return depository_withdrawal_1.getDecodedWithdrawalRecipient; } });
|
|
21
|
+
const solver_refund_1 = require("./messages/v2.1/solver-refund");
|
|
22
|
+
Object.defineProperty(exports, "SolverRefundStatus", { enumerable: true, get: function () { return solver_refund_1.SolverRefundStatus; } });
|
|
23
|
+
Object.defineProperty(exports, "getSolverRefundMessageId", { enumerable: true, get: function () { return solver_refund_1.getSolverRefundMessageId; } });
|
|
24
|
+
const solver_fill_1 = require("./messages/v2.1/solver-fill");
|
|
25
|
+
Object.defineProperty(exports, "SolverFillStatus", { enumerable: true, get: function () { return solver_fill_1.SolverFillStatus; } });
|
|
26
|
+
Object.defineProperty(exports, "getSolverFillMessageId", { enumerable: true, get: function () { return solver_fill_1.getSolverFillMessageId; } });
|
|
27
|
+
const execution_1 = require("./messages/v2.2/execution");
|
|
28
|
+
Object.defineProperty(exports, "ActionType", { enumerable: true, get: function () { return execution_1.ActionType; } });
|
|
29
|
+
Object.defineProperty(exports, "getExecutionMessageId", { enumerable: true, get: function () { return execution_1.getExecutionMessageId; } });
|
|
30
|
+
Object.defineProperty(exports, "encodeAction", { enumerable: true, get: function () { return execution_1.encodeAction; } });
|
|
31
|
+
Object.defineProperty(exports, "decodeAction", { enumerable: true, get: function () { return execution_1.decodeAction; } });
|
|
32
|
+
const utils_1 = require("./utils");
|
|
33
|
+
Object.defineProperty(exports, "decodeAddress", { enumerable: true, get: function () { return utils_1.decodeAddress; } });
|
|
34
|
+
Object.defineProperty(exports, "decodeTransactionId", { enumerable: true, get: function () { return utils_1.decodeTransactionId; } });
|
|
35
|
+
Object.defineProperty(exports, "encodeAddress", { enumerable: true, get: function () { return utils_1.encodeAddress; } });
|
|
36
|
+
Object.defineProperty(exports, "encodeBytes", { enumerable: true, get: function () { return utils_1.encodeBytes; } });
|
|
37
|
+
Object.defineProperty(exports, "encodeTransactionId", { enumerable: true, get: function () { return utils_1.encodeTransactionId; } });
|
|
38
|
+
Object.defineProperty(exports, "getVmTypeNativeCurrency", { enumerable: true, get: function () { return utils_1.getVmTypeNativeCurrency; } });
|
|
39
|
+
const withdrawal_execution_1 = require("./messages/v2.2/withdrawal-execution");
|
|
40
|
+
Object.defineProperty(exports, "getSubmitWithdrawRequestHash", { enumerable: true, get: function () { return withdrawal_execution_1.getSubmitWithdrawRequestHash; } });
|
|
41
|
+
Object.defineProperty(exports, "getWithdrawalAddress", { enumerable: true, get: function () { return withdrawal_execution_1.getWithdrawalAddress; } });
|
|
42
|
+
const hub_utils_1 = require("./hub/hub-utils");
|
|
43
|
+
Object.defineProperty(exports, "getCheckSummedAddress", { enumerable: true, get: function () { return hub_utils_1.getCheckSummedAddress; } });
|
|
44
|
+
Object.defineProperty(exports, "generateAddress", { enumerable: true, get: function () { return hub_utils_1.generateAddress; } });
|
|
45
|
+
Object.defineProperty(exports, "generateTokenId", { enumerable: true, get: function () { return hub_utils_1.generateTokenId; } });
|
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
export declare const RelayDepositoryIdl: {
|
|
2
|
+
address: string;
|
|
3
|
+
metadata: {
|
|
4
|
+
name: string;
|
|
5
|
+
version: string;
|
|
6
|
+
spec: string;
|
|
7
|
+
description: string;
|
|
8
|
+
};
|
|
9
|
+
instructions: ({
|
|
10
|
+
name: string;
|
|
11
|
+
docs: string[];
|
|
12
|
+
discriminator: number[];
|
|
13
|
+
accounts: ({
|
|
14
|
+
name: string;
|
|
15
|
+
docs: string[];
|
|
16
|
+
pda: {
|
|
17
|
+
seeds: {
|
|
18
|
+
kind: string;
|
|
19
|
+
value: number[];
|
|
20
|
+
}[];
|
|
21
|
+
};
|
|
22
|
+
writable?: undefined;
|
|
23
|
+
signer?: undefined;
|
|
24
|
+
address?: undefined;
|
|
25
|
+
} | {
|
|
26
|
+
name: string;
|
|
27
|
+
docs: string[];
|
|
28
|
+
writable: boolean;
|
|
29
|
+
signer: boolean;
|
|
30
|
+
pda?: undefined;
|
|
31
|
+
address?: undefined;
|
|
32
|
+
} | {
|
|
33
|
+
name: string;
|
|
34
|
+
docs: string[];
|
|
35
|
+
pda?: undefined;
|
|
36
|
+
writable?: undefined;
|
|
37
|
+
signer?: undefined;
|
|
38
|
+
address?: undefined;
|
|
39
|
+
} | {
|
|
40
|
+
name: string;
|
|
41
|
+
docs: string[];
|
|
42
|
+
writable: boolean;
|
|
43
|
+
pda: {
|
|
44
|
+
seeds: {
|
|
45
|
+
kind: string;
|
|
46
|
+
value: number[];
|
|
47
|
+
}[];
|
|
48
|
+
};
|
|
49
|
+
signer?: undefined;
|
|
50
|
+
address?: undefined;
|
|
51
|
+
} | {
|
|
52
|
+
name: string;
|
|
53
|
+
docs: string[];
|
|
54
|
+
address: string;
|
|
55
|
+
pda?: undefined;
|
|
56
|
+
writable?: undefined;
|
|
57
|
+
signer?: undefined;
|
|
58
|
+
})[];
|
|
59
|
+
args: ({
|
|
60
|
+
name: string;
|
|
61
|
+
type: string;
|
|
62
|
+
} | {
|
|
63
|
+
name: string;
|
|
64
|
+
type: {
|
|
65
|
+
array: (string | number)[];
|
|
66
|
+
};
|
|
67
|
+
})[];
|
|
68
|
+
} | {
|
|
69
|
+
name: string;
|
|
70
|
+
docs: string[];
|
|
71
|
+
discriminator: number[];
|
|
72
|
+
accounts: ({
|
|
73
|
+
name: string;
|
|
74
|
+
docs: string[];
|
|
75
|
+
pda: {
|
|
76
|
+
seeds: {
|
|
77
|
+
kind: string;
|
|
78
|
+
value: number[];
|
|
79
|
+
}[];
|
|
80
|
+
program?: undefined;
|
|
81
|
+
};
|
|
82
|
+
writable?: undefined;
|
|
83
|
+
signer?: undefined;
|
|
84
|
+
address?: undefined;
|
|
85
|
+
} | {
|
|
86
|
+
name: string;
|
|
87
|
+
docs: string[];
|
|
88
|
+
writable: boolean;
|
|
89
|
+
signer: boolean;
|
|
90
|
+
pda?: undefined;
|
|
91
|
+
address?: undefined;
|
|
92
|
+
} | {
|
|
93
|
+
name: string;
|
|
94
|
+
docs: string[];
|
|
95
|
+
pda?: undefined;
|
|
96
|
+
writable?: undefined;
|
|
97
|
+
signer?: undefined;
|
|
98
|
+
address?: undefined;
|
|
99
|
+
} | {
|
|
100
|
+
name: string;
|
|
101
|
+
docs: string[];
|
|
102
|
+
writable: boolean;
|
|
103
|
+
pda: {
|
|
104
|
+
seeds: {
|
|
105
|
+
kind: string;
|
|
106
|
+
path: string;
|
|
107
|
+
}[];
|
|
108
|
+
program: {
|
|
109
|
+
kind: string;
|
|
110
|
+
value: number[];
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
signer?: undefined;
|
|
114
|
+
address?: undefined;
|
|
115
|
+
} | {
|
|
116
|
+
name: string;
|
|
117
|
+
writable: boolean;
|
|
118
|
+
docs?: undefined;
|
|
119
|
+
pda?: undefined;
|
|
120
|
+
signer?: undefined;
|
|
121
|
+
address?: undefined;
|
|
122
|
+
} | {
|
|
123
|
+
name: string;
|
|
124
|
+
docs: string[];
|
|
125
|
+
address: string;
|
|
126
|
+
pda?: undefined;
|
|
127
|
+
writable?: undefined;
|
|
128
|
+
signer?: undefined;
|
|
129
|
+
})[];
|
|
130
|
+
args: ({
|
|
131
|
+
name: string;
|
|
132
|
+
type: string;
|
|
133
|
+
} | {
|
|
134
|
+
name: string;
|
|
135
|
+
type: {
|
|
136
|
+
array: (string | number)[];
|
|
137
|
+
};
|
|
138
|
+
})[];
|
|
139
|
+
} | {
|
|
140
|
+
name: string;
|
|
141
|
+
docs: string[];
|
|
142
|
+
discriminator: number[];
|
|
143
|
+
accounts: ({
|
|
144
|
+
name: string;
|
|
145
|
+
docs: string[];
|
|
146
|
+
pda: {
|
|
147
|
+
seeds: {
|
|
148
|
+
kind: string;
|
|
149
|
+
value: number[];
|
|
150
|
+
}[];
|
|
151
|
+
program?: undefined;
|
|
152
|
+
};
|
|
153
|
+
writable?: undefined;
|
|
154
|
+
signer?: undefined;
|
|
155
|
+
optional?: undefined;
|
|
156
|
+
address?: undefined;
|
|
157
|
+
} | {
|
|
158
|
+
name: string;
|
|
159
|
+
docs: string[];
|
|
160
|
+
writable: boolean;
|
|
161
|
+
signer: boolean;
|
|
162
|
+
pda?: undefined;
|
|
163
|
+
optional?: undefined;
|
|
164
|
+
address?: undefined;
|
|
165
|
+
} | {
|
|
166
|
+
name: string;
|
|
167
|
+
docs: string[];
|
|
168
|
+
writable: boolean;
|
|
169
|
+
pda?: undefined;
|
|
170
|
+
signer?: undefined;
|
|
171
|
+
optional?: undefined;
|
|
172
|
+
address?: undefined;
|
|
173
|
+
} | {
|
|
174
|
+
name: string;
|
|
175
|
+
docs: string[];
|
|
176
|
+
writable: boolean;
|
|
177
|
+
pda: {
|
|
178
|
+
seeds: {
|
|
179
|
+
kind: string;
|
|
180
|
+
value: number[];
|
|
181
|
+
}[];
|
|
182
|
+
program?: undefined;
|
|
183
|
+
};
|
|
184
|
+
signer?: undefined;
|
|
185
|
+
optional?: undefined;
|
|
186
|
+
address?: undefined;
|
|
187
|
+
} | {
|
|
188
|
+
name: string;
|
|
189
|
+
docs: string[];
|
|
190
|
+
optional: boolean;
|
|
191
|
+
pda?: undefined;
|
|
192
|
+
writable?: undefined;
|
|
193
|
+
signer?: undefined;
|
|
194
|
+
address?: undefined;
|
|
195
|
+
} | {
|
|
196
|
+
name: string;
|
|
197
|
+
docs: string[];
|
|
198
|
+
writable: boolean;
|
|
199
|
+
optional: boolean;
|
|
200
|
+
pda: {
|
|
201
|
+
seeds: {
|
|
202
|
+
kind: string;
|
|
203
|
+
path: string;
|
|
204
|
+
}[];
|
|
205
|
+
program: {
|
|
206
|
+
kind: string;
|
|
207
|
+
value: number[];
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
signer?: undefined;
|
|
211
|
+
address?: undefined;
|
|
212
|
+
} | {
|
|
213
|
+
name: string;
|
|
214
|
+
docs: string[];
|
|
215
|
+
pda?: undefined;
|
|
216
|
+
writable?: undefined;
|
|
217
|
+
signer?: undefined;
|
|
218
|
+
optional?: undefined;
|
|
219
|
+
address?: undefined;
|
|
220
|
+
} | {
|
|
221
|
+
name: string;
|
|
222
|
+
docs: string[];
|
|
223
|
+
address: string;
|
|
224
|
+
pda?: undefined;
|
|
225
|
+
writable?: undefined;
|
|
226
|
+
signer?: undefined;
|
|
227
|
+
optional?: undefined;
|
|
228
|
+
})[];
|
|
229
|
+
args: {
|
|
230
|
+
name: string;
|
|
231
|
+
type: {
|
|
232
|
+
defined: {
|
|
233
|
+
name: string;
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
}[];
|
|
237
|
+
} | {
|
|
238
|
+
name: string;
|
|
239
|
+
docs: string[];
|
|
240
|
+
discriminator: number[];
|
|
241
|
+
accounts: ({
|
|
242
|
+
name: string;
|
|
243
|
+
docs: string[];
|
|
244
|
+
writable: boolean;
|
|
245
|
+
pda: {
|
|
246
|
+
seeds: {
|
|
247
|
+
kind: string;
|
|
248
|
+
value: number[];
|
|
249
|
+
}[];
|
|
250
|
+
};
|
|
251
|
+
signer?: undefined;
|
|
252
|
+
address?: undefined;
|
|
253
|
+
} | {
|
|
254
|
+
name: string;
|
|
255
|
+
docs: string[];
|
|
256
|
+
writable: boolean;
|
|
257
|
+
signer: boolean;
|
|
258
|
+
pda?: undefined;
|
|
259
|
+
address?: undefined;
|
|
260
|
+
} | {
|
|
261
|
+
name: string;
|
|
262
|
+
docs: string[];
|
|
263
|
+
writable?: undefined;
|
|
264
|
+
pda?: undefined;
|
|
265
|
+
signer?: undefined;
|
|
266
|
+
address?: undefined;
|
|
267
|
+
} | {
|
|
268
|
+
name: string;
|
|
269
|
+
address: string;
|
|
270
|
+
docs?: undefined;
|
|
271
|
+
writable?: undefined;
|
|
272
|
+
pda?: undefined;
|
|
273
|
+
signer?: undefined;
|
|
274
|
+
})[];
|
|
275
|
+
args: {
|
|
276
|
+
name: string;
|
|
277
|
+
type: string;
|
|
278
|
+
}[];
|
|
279
|
+
} | {
|
|
280
|
+
name: string;
|
|
281
|
+
docs: string[];
|
|
282
|
+
discriminator: number[];
|
|
283
|
+
accounts: ({
|
|
284
|
+
name: string;
|
|
285
|
+
docs: string[];
|
|
286
|
+
writable: boolean;
|
|
287
|
+
pda: {
|
|
288
|
+
seeds: {
|
|
289
|
+
kind: string;
|
|
290
|
+
value: number[];
|
|
291
|
+
}[];
|
|
292
|
+
};
|
|
293
|
+
signer?: undefined;
|
|
294
|
+
} | {
|
|
295
|
+
name: string;
|
|
296
|
+
docs: string[];
|
|
297
|
+
signer: boolean;
|
|
298
|
+
writable?: undefined;
|
|
299
|
+
pda?: undefined;
|
|
300
|
+
})[];
|
|
301
|
+
args: {
|
|
302
|
+
name: string;
|
|
303
|
+
type: string;
|
|
304
|
+
}[];
|
|
305
|
+
})[];
|
|
306
|
+
accounts: {
|
|
307
|
+
name: string;
|
|
308
|
+
discriminator: number[];
|
|
309
|
+
}[];
|
|
310
|
+
events: {
|
|
311
|
+
name: string;
|
|
312
|
+
discriminator: number[];
|
|
313
|
+
}[];
|
|
314
|
+
errors: {
|
|
315
|
+
code: number;
|
|
316
|
+
name: string;
|
|
317
|
+
msg: string;
|
|
318
|
+
}[];
|
|
319
|
+
types: ({
|
|
320
|
+
name: string;
|
|
321
|
+
docs: string[];
|
|
322
|
+
type: {
|
|
323
|
+
kind: string;
|
|
324
|
+
fields: ({
|
|
325
|
+
name: string;
|
|
326
|
+
docs: string[];
|
|
327
|
+
type: string;
|
|
328
|
+
} | {
|
|
329
|
+
name: string;
|
|
330
|
+
docs: string[];
|
|
331
|
+
type: {
|
|
332
|
+
option: string;
|
|
333
|
+
array?: undefined;
|
|
334
|
+
};
|
|
335
|
+
} | {
|
|
336
|
+
name: string;
|
|
337
|
+
docs: string[];
|
|
338
|
+
type: {
|
|
339
|
+
array: (string | number)[];
|
|
340
|
+
option?: undefined;
|
|
341
|
+
};
|
|
342
|
+
})[];
|
|
343
|
+
};
|
|
344
|
+
} | {
|
|
345
|
+
name: string;
|
|
346
|
+
docs: string[];
|
|
347
|
+
type: {
|
|
348
|
+
kind: string;
|
|
349
|
+
fields: ({
|
|
350
|
+
name: string;
|
|
351
|
+
docs: string[];
|
|
352
|
+
type: string;
|
|
353
|
+
} | {
|
|
354
|
+
name: string;
|
|
355
|
+
docs: string[];
|
|
356
|
+
type: {
|
|
357
|
+
option: {
|
|
358
|
+
array: (string | number)[];
|
|
359
|
+
};
|
|
360
|
+
};
|
|
361
|
+
})[];
|
|
362
|
+
};
|
|
363
|
+
} | {
|
|
364
|
+
name: string;
|
|
365
|
+
docs: string[];
|
|
366
|
+
type: {
|
|
367
|
+
kind: string;
|
|
368
|
+
fields: ({
|
|
369
|
+
name: string;
|
|
370
|
+
docs: string[];
|
|
371
|
+
type: {
|
|
372
|
+
defined: {
|
|
373
|
+
name: string;
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
} | {
|
|
377
|
+
name: string;
|
|
378
|
+
docs: string[];
|
|
379
|
+
type: string;
|
|
380
|
+
})[];
|
|
381
|
+
};
|
|
382
|
+
})[];
|
|
383
|
+
};
|