@primuslabs/fund-js-sdk 0.1.11 → 0.1.13
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 +43 -4
- package/dist/index.d.ts +43 -4
- package/dist/index.js +2223 -1227
- package/dist/index.mjs +2223 -1227
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -36,9 +36,10 @@ declare global {
|
|
|
36
36
|
// NATIVE_TYPE = 1;
|
|
37
37
|
// ERC721_TYPE = 2;
|
|
38
38
|
type TokenType = 0 | 1 | 2
|
|
39
|
-
type
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
type ERC20TokenInfo = { tokenType: 0; tokenAddress: string }
|
|
40
|
+
type NATIVETokenInfo = { tokenType: 1; tokenAddress?: string }
|
|
41
|
+
type NFTTokenInfo = { tokenType: 2; tokenAddress: string }
|
|
42
|
+
type TokenInfo = ERC20TokenInfo | NATIVETokenInfo | NFTTokenInfo;
|
|
42
43
|
|
|
43
44
|
type RecipientBaseInfo = {
|
|
44
45
|
socialPlatform: string;// The name of the social platform.
|
|
@@ -68,4 +69,42 @@ type AttestParams = {
|
|
|
68
69
|
address: string
|
|
69
70
|
}
|
|
70
71
|
|
|
71
|
-
|
|
72
|
+
|
|
73
|
+
type RedPacketType = 0 | 1;// 0 means random red packet, 1 means average red packet.
|
|
74
|
+
type CheckParams = [bigint, string]
|
|
75
|
+
type SendForRedPacketParam = {
|
|
76
|
+
reType: RedPacketType;
|
|
77
|
+
number: bigint; // number indicates how many people the red packet is sent to.
|
|
78
|
+
amount: string; // The total amount of the red packet.
|
|
79
|
+
checkContract: string;// A contract used to check whether you are eligible to receive a red packet.
|
|
80
|
+
checkParams: string;
|
|
81
|
+
}
|
|
82
|
+
type FundForRedPacketParam = {
|
|
83
|
+
tokenInfo: TokenInfo;
|
|
84
|
+
sendParam: SendForRedPacketParam;
|
|
85
|
+
}
|
|
86
|
+
type FundERC20ForRedPacketParam = {
|
|
87
|
+
tokenInfo: ERC20TokenInfo;
|
|
88
|
+
sendParam: SendForRedPacketParam;
|
|
89
|
+
}
|
|
90
|
+
type RedPacketId = bigint;
|
|
91
|
+
type ApproveParams = {
|
|
92
|
+
spenderAddress: string;
|
|
93
|
+
approveAmount: string;
|
|
94
|
+
otherParams?:any
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
type AttestCommonParams = {
|
|
98
|
+
templateId: string;
|
|
99
|
+
address: string;
|
|
100
|
+
signFn: (signParams: string) => Promise<string>;
|
|
101
|
+
conditions?: any[];
|
|
102
|
+
additionParams: string;
|
|
103
|
+
backUrl?: string;
|
|
104
|
+
}
|
|
105
|
+
type ApproveForRedPacketParams = {
|
|
106
|
+
tokenInfo: ERC20TokenInfo;
|
|
107
|
+
approveAmount: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export type { ApproveForRedPacketParams, ApproveParams, AttNetworkRequest, AttNetworkResponseResolve, AttestCommonParams, AttestParams, Attestation, Attestor, CheckParams, ClaimParam, ERC20TokenInfo, FundERC20ForRedPacketParam, FundForRedPacketParam, FundParam, NATIVETokenInfo, NFTTokenInfo, RecipientBaseInfo, RecipientInfo, RedPacketId, RedPacketType, RefundParam, SendForRedPacketParam, TokenInfo, TokenType };
|
package/dist/index.d.ts
CHANGED
|
@@ -36,9 +36,10 @@ declare global {
|
|
|
36
36
|
// NATIVE_TYPE = 1;
|
|
37
37
|
// ERC721_TYPE = 2;
|
|
38
38
|
type TokenType = 0 | 1 | 2
|
|
39
|
-
type
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
type ERC20TokenInfo = { tokenType: 0; tokenAddress: string }
|
|
40
|
+
type NATIVETokenInfo = { tokenType: 1; tokenAddress?: string }
|
|
41
|
+
type NFTTokenInfo = { tokenType: 2; tokenAddress: string }
|
|
42
|
+
type TokenInfo = ERC20TokenInfo | NATIVETokenInfo | NFTTokenInfo;
|
|
42
43
|
|
|
43
44
|
type RecipientBaseInfo = {
|
|
44
45
|
socialPlatform: string;// The name of the social platform.
|
|
@@ -68,4 +69,42 @@ type AttestParams = {
|
|
|
68
69
|
address: string
|
|
69
70
|
}
|
|
70
71
|
|
|
71
|
-
|
|
72
|
+
|
|
73
|
+
type RedPacketType = 0 | 1;// 0 means random red packet, 1 means average red packet.
|
|
74
|
+
type CheckParams = [bigint, string]
|
|
75
|
+
type SendForRedPacketParam = {
|
|
76
|
+
reType: RedPacketType;
|
|
77
|
+
number: bigint; // number indicates how many people the red packet is sent to.
|
|
78
|
+
amount: string; // The total amount of the red packet.
|
|
79
|
+
checkContract: string;// A contract used to check whether you are eligible to receive a red packet.
|
|
80
|
+
checkParams: string;
|
|
81
|
+
}
|
|
82
|
+
type FundForRedPacketParam = {
|
|
83
|
+
tokenInfo: TokenInfo;
|
|
84
|
+
sendParam: SendForRedPacketParam;
|
|
85
|
+
}
|
|
86
|
+
type FundERC20ForRedPacketParam = {
|
|
87
|
+
tokenInfo: ERC20TokenInfo;
|
|
88
|
+
sendParam: SendForRedPacketParam;
|
|
89
|
+
}
|
|
90
|
+
type RedPacketId = bigint;
|
|
91
|
+
type ApproveParams = {
|
|
92
|
+
spenderAddress: string;
|
|
93
|
+
approveAmount: string;
|
|
94
|
+
otherParams?:any
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
type AttestCommonParams = {
|
|
98
|
+
templateId: string;
|
|
99
|
+
address: string;
|
|
100
|
+
signFn: (signParams: string) => Promise<string>;
|
|
101
|
+
conditions?: any[];
|
|
102
|
+
additionParams: string;
|
|
103
|
+
backUrl?: string;
|
|
104
|
+
}
|
|
105
|
+
type ApproveForRedPacketParams = {
|
|
106
|
+
tokenInfo: ERC20TokenInfo;
|
|
107
|
+
approveAmount: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export type { ApproveForRedPacketParams, ApproveParams, AttNetworkRequest, AttNetworkResponseResolve, AttestCommonParams, AttestParams, Attestation, Attestor, CheckParams, ClaimParam, ERC20TokenInfo, FundERC20ForRedPacketParam, FundForRedPacketParam, FundParam, NATIVETokenInfo, NFTTokenInfo, RecipientBaseInfo, RecipientInfo, RedPacketId, RedPacketType, RefundParam, SendForRedPacketParam, TokenInfo, TokenType };
|