@primuslabs/fund-js-sdk 0.1.14 → 0.1.16
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/dist/index.d.mts +30 -10
- package/dist/index.d.ts +30 -10
- package/dist/index.js +4195 -324
- package/dist/index.mjs +4192 -324
- package/package.json +9 -3
package/dist/index.d.mts
CHANGED
|
@@ -32,13 +32,13 @@ declare global {
|
|
|
32
32
|
|
|
33
33
|
// start
|
|
34
34
|
//
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
type TokenType =
|
|
39
|
-
type ERC20TokenInfo = { tokenType:
|
|
40
|
-
type NATIVETokenInfo = { tokenType:
|
|
41
|
-
type NFTTokenInfo = { tokenType:
|
|
35
|
+
type ERC20_TYPE = 0;
|
|
36
|
+
type NATIVE_TYPE = 1;
|
|
37
|
+
type ERC721_TYPE = 2;
|
|
38
|
+
type TokenType = ERC20_TYPE | NATIVE_TYPE | ERC721_TYPE
|
|
39
|
+
type ERC20TokenInfo = { tokenType: ERC20_TYPE; tokenAddress: string }
|
|
40
|
+
type NATIVETokenInfo = { tokenType: NATIVE_TYPE; tokenAddress?: string }
|
|
41
|
+
type NFTTokenInfo = { tokenType: ERC721_TYPE; tokenAddress: string }
|
|
42
42
|
type TokenInfo = ERC20TokenInfo | NATIVETokenInfo | NFTTokenInfo;
|
|
43
43
|
|
|
44
44
|
type RecipientBaseInfo = {
|
|
@@ -69,8 +69,9 @@ type AttestParams = {
|
|
|
69
69
|
address: string
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
type
|
|
72
|
+
type Random = 0;
|
|
73
|
+
type Average = 1;
|
|
74
|
+
type RedPacketType = Random | Average;// 0 means random red packet, 1 means average red packet.
|
|
74
75
|
type CheckParams = [bigint, string]
|
|
75
76
|
type SendForRedPacketParam = {
|
|
76
77
|
reType: RedPacketType;
|
|
@@ -79,6 +80,7 @@ type SendForRedPacketParam = {
|
|
|
79
80
|
checkContract: string;// A contract used to check whether you are eligible to receive a red packet.
|
|
80
81
|
checkParams: string;
|
|
81
82
|
}
|
|
83
|
+
|
|
82
84
|
type FundForRedPacketParam = {
|
|
83
85
|
tokenInfo: TokenInfo;
|
|
84
86
|
sendParam: SendForRedPacketParam;
|
|
@@ -107,4 +109,22 @@ type ApproveForRedPacketParams = {
|
|
|
107
109
|
approveAmount: string;
|
|
108
110
|
}
|
|
109
111
|
|
|
110
|
-
|
|
112
|
+
type CHECK_TYPE_X_FOLLOWING = 0;
|
|
113
|
+
type CHECK_TYPE_ACCOUNT = 1;
|
|
114
|
+
type SendOnSolanaForRedPacketParam = {
|
|
115
|
+
reType: RedPacketType;
|
|
116
|
+
number: bigint; // number indicates how many people the red packet is sent to.
|
|
117
|
+
amount: string; // The total amount of the red packet.
|
|
118
|
+
checkContract: string;// A contract used to check whether you are eligible to receive a red packet.
|
|
119
|
+
checkParams: {
|
|
120
|
+
checkType: CHECK_TYPE_X_FOLLOWING | CHECK_TYPE_ACCOUNT;
|
|
121
|
+
params: string;
|
|
122
|
+
};
|
|
123
|
+
emptyRatio: number; // empty rate of red packet, 0 means no empty envelope.
|
|
124
|
+
}
|
|
125
|
+
type FundOnSolanaForRedPacketParam = {
|
|
126
|
+
tokenInfo: TokenInfo;
|
|
127
|
+
sendParam: SendOnSolanaForRedPacketParam;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export type { ApproveForRedPacketParams, ApproveParams, AttNetworkRequest, AttNetworkResponseResolve, AttestCommonParams, AttestParams, Attestation, Attestor, Average, CHECK_TYPE_ACCOUNT, CHECK_TYPE_X_FOLLOWING, CheckParams, ClaimParam, ERC20TokenInfo, ERC20_TYPE, ERC721_TYPE, FundERC20ForRedPacketParam, FundForRedPacketParam, FundOnSolanaForRedPacketParam, FundParam, NATIVETokenInfo, NATIVE_TYPE, NFTTokenInfo, Random, RecipientBaseInfo, RecipientInfo, RedPacketId, RedPacketType, RefundParam, SendForRedPacketParam, SendOnSolanaForRedPacketParam, TokenInfo, TokenType };
|
package/dist/index.d.ts
CHANGED
|
@@ -32,13 +32,13 @@ declare global {
|
|
|
32
32
|
|
|
33
33
|
// start
|
|
34
34
|
//
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
type TokenType =
|
|
39
|
-
type ERC20TokenInfo = { tokenType:
|
|
40
|
-
type NATIVETokenInfo = { tokenType:
|
|
41
|
-
type NFTTokenInfo = { tokenType:
|
|
35
|
+
type ERC20_TYPE = 0;
|
|
36
|
+
type NATIVE_TYPE = 1;
|
|
37
|
+
type ERC721_TYPE = 2;
|
|
38
|
+
type TokenType = ERC20_TYPE | NATIVE_TYPE | ERC721_TYPE
|
|
39
|
+
type ERC20TokenInfo = { tokenType: ERC20_TYPE; tokenAddress: string }
|
|
40
|
+
type NATIVETokenInfo = { tokenType: NATIVE_TYPE; tokenAddress?: string }
|
|
41
|
+
type NFTTokenInfo = { tokenType: ERC721_TYPE; tokenAddress: string }
|
|
42
42
|
type TokenInfo = ERC20TokenInfo | NATIVETokenInfo | NFTTokenInfo;
|
|
43
43
|
|
|
44
44
|
type RecipientBaseInfo = {
|
|
@@ -69,8 +69,9 @@ type AttestParams = {
|
|
|
69
69
|
address: string
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
type
|
|
72
|
+
type Random = 0;
|
|
73
|
+
type Average = 1;
|
|
74
|
+
type RedPacketType = Random | Average;// 0 means random red packet, 1 means average red packet.
|
|
74
75
|
type CheckParams = [bigint, string]
|
|
75
76
|
type SendForRedPacketParam = {
|
|
76
77
|
reType: RedPacketType;
|
|
@@ -79,6 +80,7 @@ type SendForRedPacketParam = {
|
|
|
79
80
|
checkContract: string;// A contract used to check whether you are eligible to receive a red packet.
|
|
80
81
|
checkParams: string;
|
|
81
82
|
}
|
|
83
|
+
|
|
82
84
|
type FundForRedPacketParam = {
|
|
83
85
|
tokenInfo: TokenInfo;
|
|
84
86
|
sendParam: SendForRedPacketParam;
|
|
@@ -107,4 +109,22 @@ type ApproveForRedPacketParams = {
|
|
|
107
109
|
approveAmount: string;
|
|
108
110
|
}
|
|
109
111
|
|
|
110
|
-
|
|
112
|
+
type CHECK_TYPE_X_FOLLOWING = 0;
|
|
113
|
+
type CHECK_TYPE_ACCOUNT = 1;
|
|
114
|
+
type SendOnSolanaForRedPacketParam = {
|
|
115
|
+
reType: RedPacketType;
|
|
116
|
+
number: bigint; // number indicates how many people the red packet is sent to.
|
|
117
|
+
amount: string; // The total amount of the red packet.
|
|
118
|
+
checkContract: string;// A contract used to check whether you are eligible to receive a red packet.
|
|
119
|
+
checkParams: {
|
|
120
|
+
checkType: CHECK_TYPE_X_FOLLOWING | CHECK_TYPE_ACCOUNT;
|
|
121
|
+
params: string;
|
|
122
|
+
};
|
|
123
|
+
emptyRatio: number; // empty rate of red packet, 0 means no empty envelope.
|
|
124
|
+
}
|
|
125
|
+
type FundOnSolanaForRedPacketParam = {
|
|
126
|
+
tokenInfo: TokenInfo;
|
|
127
|
+
sendParam: SendOnSolanaForRedPacketParam;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export type { ApproveForRedPacketParams, ApproveParams, AttNetworkRequest, AttNetworkResponseResolve, AttestCommonParams, AttestParams, Attestation, Attestor, Average, CHECK_TYPE_ACCOUNT, CHECK_TYPE_X_FOLLOWING, CheckParams, ClaimParam, ERC20TokenInfo, ERC20_TYPE, ERC721_TYPE, FundERC20ForRedPacketParam, FundForRedPacketParam, FundOnSolanaForRedPacketParam, FundParam, NATIVETokenInfo, NATIVE_TYPE, NFTTokenInfo, Random, RecipientBaseInfo, RecipientInfo, RedPacketId, RedPacketType, RefundParam, SendForRedPacketParam, SendOnSolanaForRedPacketParam, TokenInfo, TokenType };
|