Created
April 21, 2020 08:49
-
-
Save kyranjamie/1730753b175db486f51bcc3696b257fd to your computer and use it in GitHub Desktop.
generated post conditions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface PostConditionFungible { | |
principal: | |
| { | |
typeId: 1; | |
} | |
| { | |
typeId: 2; | |
/** | |
* Raw data is stored in instances of the Buffer class. | |
* A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. | |
* Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' | |
*/ | |
address: { | |
version: number; | |
bytes: number[]; | |
}; | |
} | |
| { | |
typeId: 3; | |
/** | |
* Raw data is stored in instances of the Buffer class. | |
* A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. | |
* Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' | |
*/ | |
address: { | |
version: number; | |
bytes: number[]; | |
}; | |
contractName: string; | |
}; | |
conditionCode: 1 | 2 | 3 | 4 | 5; | |
amount: string; | |
assetInfoId: 1; | |
} | |
export interface PostConditionNonFungible { | |
principal: | |
| { | |
typeId: 1; | |
} | |
| { | |
typeId: 2; | |
/** | |
* Raw data is stored in instances of the Buffer class. | |
* A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. | |
* Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' | |
*/ | |
address: { | |
version: number; | |
bytes: number[]; | |
}; | |
} | |
| { | |
typeId: 3; | |
/** | |
* Raw data is stored in instances of the Buffer class. | |
* A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. | |
* Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' | |
*/ | |
address: { | |
version: number; | |
bytes: number[]; | |
}; | |
contractName: string; | |
}; | |
/** | |
* 10 = Sent, 11 = NotSent | |
*/ | |
conditionCode: 10 | 11; | |
amount: string; | |
assetInfoId: 2; | |
assetValue: number; | |
asset: { | |
assetName: string; | |
contractAddress: string; | |
contractName: string; | |
}; | |
} | |
export interface PostConditionStx { | |
principal: | |
| { | |
typeId: 1; | |
} | |
| { | |
typeId: 2; | |
/** | |
* Raw data is stored in instances of the Buffer class. | |
* A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. | |
* Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' | |
*/ | |
address: { | |
version: number; | |
bytes: number[]; | |
}; | |
} | |
| { | |
typeId: 3; | |
/** | |
* Raw data is stored in instances of the Buffer class. | |
* A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. | |
* Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' | |
*/ | |
address: { | |
version: number; | |
bytes: number[]; | |
}; | |
contractName: string; | |
}; | |
conditionCode: 1 | 2 | 3 | 4 | 5; | |
amount: string; | |
assetInfoId: 0; | |
} | |
export type PostCondition = PostConditionStx | PostConditionFungible | PostConditionNonFungible; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment